lcl: customcontrol, graphiccontrol: High-DPI: assign PixelsPerInch to Canvas.Font

git-svn-id: trunk@54225 -
This commit is contained in:
ondrej 2017-02-21 14:00:23 +00:00
parent d6983d5300
commit 6f5693f5ff
2 changed files with 14 additions and 2 deletions

View File

@ -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;

View File

@ -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;