mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-30 18:29:45 +02:00
lcl: customcontrol, graphiccontrol: High-DPI: assign PixelsPerInch to Canvas.Font
git-svn-id: trunk@54225 -
This commit is contained in:
parent
d6983d5300
commit
6f5693f5ff
@ -75,7 +75,13 @@ end;
|
||||
|
||||
procedure TCustomControl.FontChanged(Sender: TObject);
|
||||
begin
|
||||
Canvas.Font := Font;
|
||||
Canvas.Font.BeginUpdate;
|
||||
try
|
||||
Canvas.Font.PixelsPerInch := Font.PixelsPerInch;
|
||||
Canvas.Font := Font;
|
||||
finally
|
||||
Canvas.Font.EndUpdate;
|
||||
end;
|
||||
inherited FontChanged(Sender);
|
||||
end;
|
||||
|
||||
|
@ -73,7 +73,13 @@ end;
|
||||
|
||||
procedure TGraphicControl.FontChanged(Sender: TObject);
|
||||
begin
|
||||
Canvas.Font:=Font;
|
||||
Canvas.Font.BeginUpdate;
|
||||
try
|
||||
Canvas.Font.PixelsPerInch := Font.PixelsPerInch;
|
||||
Canvas.Font := Font;
|
||||
finally
|
||||
Canvas.Font.EndUpdate;
|
||||
end;
|
||||
inherited FontChanged(Sender);
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user