Ignore:
Timestamp:
Jan 7, 2024, 11:23:36 PM (4 months ago)
Author:
chronos
Message:
  • Fixed: Avoid repeatedly calling Term form resize and repaint in case of fractional scaling.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/DpiControls/Dpi.Common.pas

    r522 r523  
    8989  uFlags: UINT): Boolean;
    9090begin
    91   LCLIntf.SetWindowPos(hWnd, hWndInsertAfter, ScaleToNative(X), ScaleToNative(Y),
     91  Result := LCLIntf.SetWindowPos(hWnd, hWndInsertAfter, ScaleToNative(X), ScaleToNative(Y),
    9292    ScaleToNative(cx), ScaleToNative(cy), uFlags);
    9393end;
     
    105105function ScaleFromNative(Value: Integer): Integer;
    106106begin
    107   Result := Round(Value * 96 / ScreenInfo.Dpi);
     107  Result := Floor(Value * 96 / ScreenInfo.Dpi);
    108108end;
    109109
Note: See TracChangeset for help on using the changeset viewer.