mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-17 01:01:01 +01: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);
|
procedure TCustomControl.FontChanged(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
|
Canvas.Font.BeginUpdate;
|
||||||
|
try
|
||||||
|
Canvas.Font.PixelsPerInch := Font.PixelsPerInch;
|
||||||
Canvas.Font := Font;
|
Canvas.Font := Font;
|
||||||
|
finally
|
||||||
|
Canvas.Font.EndUpdate;
|
||||||
|
end;
|
||||||
inherited FontChanged(Sender);
|
inherited FontChanged(Sender);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
@ -73,7 +73,13 @@ end;
|
|||||||
|
|
||||||
procedure TGraphicControl.FontChanged(Sender: TObject);
|
procedure TGraphicControl.FontChanged(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
|
Canvas.Font.BeginUpdate;
|
||||||
|
try
|
||||||
|
Canvas.Font.PixelsPerInch := Font.PixelsPerInch;
|
||||||
Canvas.Font := Font;
|
Canvas.Font := Font;
|
||||||
|
finally
|
||||||
|
Canvas.Font.EndUpdate;
|
||||||
|
end;
|
||||||
inherited FontChanged(Sender);
|
inherited FontChanged(Sender);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user