mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 15:39:49 +02:00
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:
parent
337925d861
commit
9304766a81
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user