You've already forked lazarus-ccr
fpspreadsheet: Improved painting of WorksheetGrid's FocusRect (priority to stay inside the cell).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5854 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@@ -2850,7 +2850,7 @@ var
|
|||||||
R: TRect;
|
R: TRect;
|
||||||
cell: PCell;
|
cell: PCell;
|
||||||
r1,c1,r2,c2: Cardinal;
|
r1,c1,r2,c2: Cardinal;
|
||||||
//delta: Integer;
|
delta: Integer;
|
||||||
savedPenMode: TPenMode;
|
savedPenMode: TPenMode;
|
||||||
begin
|
begin
|
||||||
if Worksheet = nil then
|
if Worksheet = nil then
|
||||||
@@ -2865,9 +2865,15 @@ 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);
|
||||||
|
|
||||||
|
// Draw focus rect inside
|
||||||
|
delta := Max(FSelPen.Width div 2, 0);
|
||||||
|
inc(R.Top, delta);
|
||||||
|
if IsRightToLeft then dec(R.Right, delta) else inc(R.Left, delta);
|
||||||
|
|
||||||
|
{
|
||||||
dec(R.Top);
|
dec(R.Top);
|
||||||
if IsRightToLeft then inc(R.Right) else dec(R.Left);
|
if IsRightToLeft then inc(R.Right) else dec(R.Left);
|
||||||
|
}
|
||||||
// Cosmetics at the edges of the grid to avoid spurious rests
|
// Cosmetics at the edges of the grid to avoid spurious rests
|
||||||
{
|
{
|
||||||
delta := Max(FSelPen.Width div 2, 0);
|
delta := Max(FSelPen.Width div 2, 0);
|
||||||
|
Reference in New Issue
Block a user