mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-30 01:29:20 +02:00
Grids, if grid.font is modified while painting, do affect canvas.font directly to avoid repainting cycles due invalidates
git-svn-id: trunk@19434 -
This commit is contained in:
parent
f609a21c6e
commit
df15c64cf9
@ -6228,12 +6228,16 @@ end;
|
||||
|
||||
procedure TCustomGrid.FontChanged(Sender: TObject);
|
||||
begin
|
||||
inherited FontChanged(Sender);
|
||||
if FColumns.Enabled then
|
||||
FColumns.FontChanged;
|
||||
if FTitleFontIsDefault then begin
|
||||
FTitleFont.Assign(Font);
|
||||
FTitleFontIsDefault := True;
|
||||
if csCustomPaint in ControlState then
|
||||
Canvas.Font := Font
|
||||
else begin
|
||||
inherited FontChanged(Sender);
|
||||
if FColumns.Enabled then
|
||||
FColumns.FontChanged;
|
||||
if FTitleFontIsDefault then begin
|
||||
FTitleFont.Assign(Font);
|
||||
FTitleFontIsDefault := True;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user