You've already forked lazarus-ccr
fpspreadsheet: Fix LCLScaling of comment marker in grid.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8625 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@@ -2761,20 +2761,22 @@ const
|
|||||||
COMMENT_SIZE = 7;
|
COMMENT_SIZE = 7;
|
||||||
var
|
var
|
||||||
P: Array[0..3] of TPoint;
|
P: Array[0..3] of TPoint;
|
||||||
|
commentSize: Integer;
|
||||||
begin
|
begin
|
||||||
Canvas.Brush.Color := clRed;
|
Canvas.Brush.Color := clRed;
|
||||||
Canvas.Brush.Style := bsSolid;
|
Canvas.Brush.Style := bsSolid;
|
||||||
Canvas.Pen.Style := psClear;
|
Canvas.Pen.Style := psClear;
|
||||||
|
commentSize := Scale96ToFont(COMMENT_SIZE);
|
||||||
if IsRightToLeft then
|
if IsRightToLeft then
|
||||||
begin
|
begin
|
||||||
P[0] := Point(ARect.Left, ARect.Top);
|
P[0] := Point(ARect.Left, ARect.Top);
|
||||||
P[1] := Point(ARect.Left + COMMENT_SIZE, ARect.Top);
|
P[1] := Point(ARect.Left + commentSize, ARect.Top);
|
||||||
P[2] := Point(ARect.Left, ARect.Top + COMMENT_SIZE);
|
P[2] := Point(ARect.Left, ARect.Top + commentSize);
|
||||||
end else
|
end else
|
||||||
begin
|
begin
|
||||||
P[0] := Point(ARect.Right, ARect.Top);
|
P[0] := Point(ARect.Right, ARect.Top);
|
||||||
P[1] := Point(ARect.Right - COMMENT_SIZE, ARect.Top);
|
P[1] := Point(ARect.Right - commentSize, ARect.Top);
|
||||||
P[2] := Point(ARect.Right, ARect.Top + COMMENT_SIZE);
|
P[2] := Point(ARect.Right, ARect.Top + commentSize);
|
||||||
end;
|
end;
|
||||||
P[3] := P[0];
|
P[3] := P[0];
|
||||||
Canvas.Polygon(P);
|
Canvas.Polygon(P);
|
||||||
|
Reference in New Issue
Block a user