mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-11 10:20:53 +01:00
LCL: HighDPI: check Application.Scaled for auto-scaling
git-svn-id: trunk@54260 -
This commit is contained in:
parent
a0b00a6d66
commit
d79fd99a1e
@ -511,7 +511,7 @@ begin
|
||||
Exit;
|
||||
end;
|
||||
|
||||
if PixelsPerInch<>Monitor.PixelsPerInch then
|
||||
if Application.Scaled and (PixelsPerInch<>Monitor.PixelsPerInch) then
|
||||
AutoAdjustLayout(lapAutoAdjustForDPI, PixelsPerInch, Monitor.PixelsPerInch,
|
||||
MulDiv(Width, Monitor.PixelsPerInch, PixelsPerInch),
|
||||
MulDiv(Height, Monitor.PixelsPerInch, PixelsPerInch));
|
||||
@ -2293,7 +2293,7 @@ begin
|
||||
if Parent=nil then
|
||||
begin
|
||||
NewDpi := hi(Msg.wParam);
|
||||
if Scaled and (NewDpi<>PixelsPerInch) then
|
||||
if Application.Scaled and Scaled and (NewDpi<>PixelsPerInch) then
|
||||
AutoAdjustLayout(lapAutoAdjustForDPI, PixelsPerInch, NewDpi,
|
||||
Width, MulDiv(Width, NewDpi, PixelsPerInch));
|
||||
end;
|
||||
@ -2312,7 +2312,7 @@ end;
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TCustomForm.Show;
|
||||
begin
|
||||
if Scaled and (Monitor.PixelsPerInch<>PixelsPerInch) then
|
||||
if Application.Scaled and Scaled and (Monitor.PixelsPerInch<>PixelsPerInch) then
|
||||
AutoAdjustLayout(lapAutoAdjustForDPI, PixelsPerInch, Monitor.PixelsPerInch,
|
||||
Width, MulDiv(Width, Monitor.PixelsPerInch, PixelsPerInch));
|
||||
|
||||
|
||||
@ -131,7 +131,7 @@ begin
|
||||
UpdateActionLists(Self,opInsert);
|
||||
|
||||
ParentForm := GetParentForm(Self);
|
||||
if (ParentForm<>nil) and ParentForm.Scaled
|
||||
if Application.Scaled and (ParentForm<>nil) and ParentForm.Scaled
|
||||
and (ParentForm.PixelsPerInch<>PixelsPerInch) then
|
||||
AutoAdjustLayout(lapAutoAdjustForDPI, PixelsPerInch, ParentForm.PixelsPerInch, 0, 0);
|
||||
end;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user