You've already forked lazarus-ccr
fpspreadsheet: Finetune position of selection rectangle in grid.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5856 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -2877,43 +2877,26 @@ begin
|
|||||||
end else
|
end else
|
||||||
R := CellRect(Selection.Left, Selection.Top, Selection.Right, Selection.Bottom);
|
R := CellRect(Selection.Left, Selection.Top, Selection.Right, Selection.Bottom);
|
||||||
|
|
||||||
dec(R.Top);
|
// Fine-tune position of selection rect
|
||||||
dec(R.Left);
|
if odd(FSelPen.Width) then delta := -1 else delta := 0;
|
||||||
(*
|
|
||||||
// Draw focus rect inside
|
|
||||||
if GetShowHeaders then
|
|
||||||
delta := 0 else
|
|
||||||
delta := Max(FSelPen.Width div 2, 0);
|
|
||||||
inc(R.Top, delta);
|
inc(R.Top, delta);
|
||||||
if IsRightToLeft then dec(R.Right, delta) else inc(R.Left, delta);
|
|
||||||
*)
|
|
||||||
(*
|
|
||||||
dec(R.Top);
|
|
||||||
if IsRightToLeft then inc(R.Right) else dec(R.Left);
|
|
||||||
*)
|
|
||||||
// Cosmetics at the edges of the grid to avoid spurious rests
|
|
||||||
(*
|
|
||||||
delta := Max(FSelPen.Width div 2, 0);
|
|
||||||
|
|
||||||
if Selection.Top > TopRow then
|
|
||||||
dec(R.Top, delta) else
|
|
||||||
inc(R.Top, delta);
|
|
||||||
if Selection.Bottom = RowCount-1 then
|
|
||||||
dec(R.Bottom, delta);
|
|
||||||
if IsRightToLeft then begin
|
if IsRightToLeft then begin
|
||||||
if Selection.Right > LeftCol then
|
if not odd(FSelPen.Width) then
|
||||||
inc(R.Right, delta) else
|
OffsetRect(R, 1, 0) else
|
||||||
dec(R.Right, delta);
|
inc(R.Right, 1);
|
||||||
if Selection.Right = ColCount-1 then
|
|
||||||
inc(R.Left, delta);
|
|
||||||
end else
|
end else
|
||||||
begin
|
inc(R.Left, delta);
|
||||||
if Selection.Left > LeftCol then
|
|
||||||
dec(R.Left, delta) else
|
if FSelPen.Width > 1 then begin
|
||||||
inc(R.Left, delta);
|
if (Selection.Top = TopRow) then
|
||||||
if Selection.Right = ColCount-1 then
|
inc(R.Top);
|
||||||
dec(R.Right, delta);
|
if Selection.Left = LeftCol then begin
|
||||||
end; *)
|
if IsRightToLeft then
|
||||||
|
dec(R.Right)
|
||||||
|
else
|
||||||
|
inc(R.Left);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
// Set up the canvas
|
// Set up the canvas
|
||||||
savedPenMode := Canvas.Pen.Mode;
|
savedPenMode := Canvas.Pen.Mode;
|
||||||
|
Reference in New Issue
Block a user