LCL: forms: call AutoAdjustLayout in Show if necessary - it doesn't receive LM_DPICHANGED if the form is moved to a different monitor while being invisible.

git-svn-id: trunk@53993 -
This commit is contained in:
ondrej 2017-01-24 12:12:18 +00:00
parent ae58211303
commit df696ddabc

View File

@ -2318,6 +2318,10 @@ end;
------------------------------------------------------------------------------}
procedure TCustomForm.Show;
begin
if Scaled and (Monitor.PixelsPerInch<>PixelsPerInch) then
AutoAdjustLayout(lapAutoAdjustForDPI, PixelsPerInch, Monitor.PixelsPerInch,
Width, MulDiv(Width, Monitor.PixelsPerInch, PixelsPerInch), True);
Visible := True;
BringToFront;
end;