mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-02 20:21:12 +02:00
grids: Fix size of focus rectangle if gridlinewidth > 1 (issue #32002)
git-svn-id: trunk@55334 -
This commit is contained in:
parent
9b0908abc4
commit
afacb97710
@ -7689,10 +7689,6 @@ begin
|
||||
end;
|
||||
|
||||
procedure TCustomGrid.CalcFocusRect(var ARect: TRect; adjust: boolean = true);
|
||||
{
|
||||
var
|
||||
dx,dy: integer;
|
||||
}
|
||||
begin
|
||||
if goRowSelect in Options then begin
|
||||
|
||||
@ -7700,7 +7696,7 @@ begin
|
||||
aRect.Left := GCache.ClientWidth - GCache.MaxClientXY.x;
|
||||
aRect.Right := GCache.ClientWidth - GCache.FixedWidth;
|
||||
end else begin
|
||||
aRect.Left := GCache.FixedWidth + 1;
|
||||
aRect.Left := GCache.FixedWidth;
|
||||
aRect.Right := GCache.MaxClientXY.x;
|
||||
end;
|
||||
|
||||
@ -7710,22 +7706,14 @@ begin
|
||||
if not adjust then
|
||||
exit;
|
||||
|
||||
if goHorzLine in Options then dec(aRect.Bottom, 1);
|
||||
if goHorzLine in Options then
|
||||
dec(aRect.Bottom, 1 + FGridLineWidth div 2);
|
||||
|
||||
if goVertLine in Options then
|
||||
if UseRightToLeftAlignment then
|
||||
inc(aRect.Left, 1)
|
||||
inc(aRect.Left, 1 + FGridLineWidth div 2)
|
||||
else
|
||||
dec(aRect.Right, 1);
|
||||
{
|
||||
if not (goHorzLine in Options) then begin
|
||||
aRect.Bottom := aRect.Bottom + 1;
|
||||
Dec(aRect.Botton, 1);
|
||||
end;
|
||||
if not (goVertLine in Options) then begin
|
||||
aRect.Right := aRect.Right + 1;
|
||||
Dec(aRect.Botton, 1);
|
||||
end;
|
||||
}
|
||||
dec(aRect.Right, 1 + FGridLineWidth div 2);
|
||||
end;
|
||||
|
||||
procedure TCustomGrid.CalcScrollbarsRange;
|
||||
|
Loading…
Reference in New Issue
Block a user