lcl: forms: highDPI: ScaleBy only when scale really changed.

git-svn-id: trunk@53501 -
This commit is contained in:
ondrej 2016-12-01 00:28:15 +00:00
parent 1c9c0abeb2
commit f4df715ad3

View File

@ -159,7 +159,7 @@ begin
EndFormUpdate; // the BeginFormUpdate is in CreateNew
inherited AfterConstruction;
if Scaled then
if Scaled and (Screen.PixelsPerInch<>DesignTimeDPI) then
begin
ScaleBy(Screen.PixelsPerInch, DesignTimeDPI);
FPixelsPerInch := Screen.PixelsPerInch;
@ -2249,7 +2249,7 @@ procedure TCustomForm.WMDPIChanged(var Msg: TLMessage);
begin
if Parent=nil then
begin
if Scaled then
if Scaled and (Msg.wParamhi<>PixelsPerInch) then
begin
ScaleBy(Msg.wParamhi, PixelsPerInch);
FPixelsPerInch := Msg.wParamhi;