mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-11 09:36:10 +02:00
lcl: forms: use a variable in WMDPIChanged. Issue #31050, by AlexeyT
git-svn-id: trunk@53529 -
This commit is contained in:
parent
23574b1a4a
commit
c94e49018d
@ -2248,14 +2248,17 @@ begin
|
||||
end;
|
||||
|
||||
procedure TCustomForm.WMDPIChanged(var Msg: TLMessage);
|
||||
var
|
||||
NewDpi: integer;
|
||||
begin
|
||||
if Parent=nil then
|
||||
begin
|
||||
if Scaled and (hi(Msg.wParam)<>PixelsPerInch) then
|
||||
NewDpi := hi(Msg.wParam);
|
||||
if Scaled and (NewDpi<>PixelsPerInch) then
|
||||
begin
|
||||
AutoAdjustLayout(lapAutoAdjustForDPI, FPixelsPerInch, hi(Msg.wParam),
|
||||
Width, MulDiv(Width, hi(Msg.wParam), FPixelsPerInch), True);
|
||||
FPixelsPerInch := hi(Msg.wParam);
|
||||
AutoAdjustLayout(lapAutoAdjustForDPI, FPixelsPerInch, NewDpi,
|
||||
Width, MulDiv(Width, NewDpi, FPixelsPerInch), True);
|
||||
FPixelsPerInch := NewDpi;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user