fpspreadsheet: Fix position of comment marker triangle in WorksheetGrid for RTL

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4475 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2016-01-26 12:07:56 +00:00
parent aa29b42ebc
commit cd94f9e48e

View File

@ -1846,7 +1846,7 @@ const
else if (ADrawDirection in [drawDiagUp, drawDiagDown]) then
begin
dec(ARect.Right, 1);
dec(ARect.Bottom, 1);
dec(ARect.Bottom, 2);
end;
end;
@ -1984,9 +1984,17 @@ begin
Canvas.Brush.Color := clRed;
Canvas.Brush.Style := bsSolid;
Canvas.Pen.Style := psClear;
P[0] := Point(ARect.Right, ARect.Top);
P[1] := Point(ARect.Right - COMMENT_SIZE, ARect.Top);
P[2] := Point(ARect.Right, ARect.Top + COMMENT_SIZE);
if IsRightToLeft then
begin
P[0] := Point(ARect.Left, ARect.Top);
P[1] := Point(ARect.Left + COMMENT_SIZE, ARect.Top);
P[2] := Point(ARect.Left, ARect.Top + COMMENT_SIZE);
end else
begin
P[0] := Point(ARect.Right, ARect.Top);
P[1] := Point(ARect.Right - COMMENT_SIZE, ARect.Top);
P[2] := Point(ARect.Right, ARect.Top + COMMENT_SIZE);
end;
P[3] := P[0];
Canvas.Polygon(P);
end;