mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-10 02:28:04 +02:00
dbgrid: fixed cell grid might draw over vertical grid lines (issue #8318)
grid: added small margin at the right side of cell so text near the grid line looks better git-svn-id: trunk@10628 -
This commit is contained in:
parent
332746fa0f
commit
d947dfbb55
@ -2398,7 +2398,9 @@ end;
|
||||
procedure TCustomDBGrid.DrawCell(aCol, aRow: Integer; aRect: TRect;
|
||||
aState: TGridDrawState);
|
||||
begin
|
||||
inherited DrawCell(aCol, aRow, aRect, aState);
|
||||
PrepareCanvas(aCol, aRow, aState);
|
||||
if DefaultDrawing then
|
||||
Canvas.FillRect(aRect);
|
||||
{$ifdef dbgGridPaint}
|
||||
DbgOut(' ',IntToStr(aCol));
|
||||
if gdSelected in aState then DbgOut('S');
|
||||
@ -2409,6 +2411,7 @@ begin
|
||||
OnDrawColumnCell(Self, aRect, aCol, TColumn(ColumnFromGridColumn(aCol)), aState)
|
||||
else
|
||||
DefaultDrawCell(aCol, aRow, aRect, aState);
|
||||
DrawCellGrid(aCol, aRow, aRect, aState);
|
||||
end;
|
||||
|
||||
procedure TCustomDBGrid.DrawCheckboxBitmaps(aCol: Integer; aRect: TRect;
|
||||
|
@ -2983,9 +2983,10 @@ end;
|
||||
procedure TCustomGrid.DrawCellText(aCol, aRow: Integer; aRect: TRect;
|
||||
aState: TGridDrawState; aText: String);
|
||||
begin
|
||||
dec(aRect.Right, 3);
|
||||
case Canvas.TextStyle.Alignment of
|
||||
Classes.taLeftJustify: Inc(aRect.Left, 3);
|
||||
Classes.taRightJustify: Dec(aRect.Right, 3);
|
||||
Classes.taRightJustify: Dec(aRect.Right, 1);
|
||||
end;
|
||||
case Canvas.TextStyle.Layout of
|
||||
tlTop: Inc(aRect.Top, 3);
|
||||
|
Loading…
Reference in New Issue
Block a user