Changeset 491 for trunk/Settings.pas


Ignore:
Timestamp:
Dec 11, 2023, 1:07:49 PM (11 months ago)
Author:
chronos
Message:
  • Modified: Disable fractional scaling for release mode.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Settings.pas

    r473 r491  
    6060  SettingsDlg: TSettingsDlg;
    6161
     62const
     63  DpiMin = 100;
     64  DpiMax = 500;
     65  {$IFDEF DEBUG}
     66  DpiStep = 25;
     67  {$ELSE}
     68  DpiStep = 100;
     69  {$ENDIF}
     70
    6271
    6372implementation
     
    168177procedure TSettingsDlg.ButtonDpiDownClick(Sender: TObject);
    169178begin
    170   if LocalDpi >= 105 then
    171   begin
    172     Dec(LocalDpi, 5);
    173     Invalidate;
    174   end;
     179  Dec(LocalDpi, DpiStep);
     180  if LocalDpi < DpiMin then LocalDpi := DpiMin;
     181  Invalidate;
    175182end;
    176183
     
    182189procedure TSettingsDlg.ButtonDpiUpClick(Sender: TObject);
    183190begin
    184   if LocalDpi <= 495 then begin
    185     Inc(LocalDpi, 5);
    186     Invalidate;
    187   end;
     191  Inc(LocalDpi, DpiStep);
     192  if LocalDpi > DpiMax then LocalDpi := DpiMax;
     193  Invalidate;
    188194end;
    189195
Note: See TracChangeset for help on using the changeset viewer.