lcl: forms: highDPI: use AutoAdjustLayout instead of ScaleBy for DPI-scaling. Issue #31045, by AlexeyT

git-svn-id: trunk@53513 -
This commit is contained in:
ondrej 2016-12-01 22:03:27 +00:00
parent 337925d861
commit 9304766a81

View File

@ -161,7 +161,8 @@ begin
if Scaled and (Screen.PixelsPerInch<>FPixelsPerInch) then
begin
ScaleBy(Screen.PixelsPerInch, PixelsPerInch);
AutoAdjustLayout(lapAutoAdjustForDPI, FPixelsPerInch, Screen.PixelsPerInch,
Width, MulDiv(Width, Screen.PixelsPerInch, FPixelsPerInch));
FPixelsPerInch := Screen.PixelsPerInch;
end;
end;
@ -2252,7 +2253,8 @@ begin
begin
if Scaled and (hi(Msg.wParam)<>PixelsPerInch) then
begin
ScaleBy(hi(Msg.wParam), PixelsPerInch);
AutoAdjustLayout(lapAutoAdjustForDPI, FPixelsPerInch, hi(Msg.wParam),
Width, MulDiv(Width, hi(Msg.wParam), FPixelsPerInch));
FPixelsPerInch := hi(Msg.wParam);
end;
end;