mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 05:39:14 +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
|
if Scaled and (Screen.PixelsPerInch<>FPixelsPerInch) then
|
||||||
begin
|
begin
|
||||||
ScaleBy(Screen.PixelsPerInch, PixelsPerInch);
|
AutoAdjustLayout(lapAutoAdjustForDPI, FPixelsPerInch, Screen.PixelsPerInch,
|
||||||
|
Width, MulDiv(Width, Screen.PixelsPerInch, FPixelsPerInch));
|
||||||
FPixelsPerInch := Screen.PixelsPerInch;
|
FPixelsPerInch := Screen.PixelsPerInch;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -2252,7 +2253,8 @@ begin
|
|||||||
begin
|
begin
|
||||||
if Scaled and (hi(Msg.wParam)<>PixelsPerInch) then
|
if Scaled and (hi(Msg.wParam)<>PixelsPerInch) then
|
||||||
begin
|
begin
|
||||||
ScaleBy(hi(Msg.wParam), PixelsPerInch);
|
AutoAdjustLayout(lapAutoAdjustForDPI, FPixelsPerInch, hi(Msg.wParam),
|
||||||
|
Width, MulDiv(Width, hi(Msg.wParam), FPixelsPerInch));
|
||||||
FPixelsPerInch := hi(Msg.wParam);
|
FPixelsPerInch := hi(Msg.wParam);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user