Ignore:
Timestamp:
Oct 11, 2016, 3:56:47 PM (8 years ago)
Author:
chronos
Message:
  • Added: Hidden settings of DPI.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormSettings.pas

    r102 r105  
    77uses
    88  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
    9   Menus, ULanguages;
     9  Menus, Spin, ULanguages;
    1010
    1111type
     
    1616    ButtonOk: TButton;
    1717    ButtonCancel: TButton;
     18    CheckBoxAutomaticDPI: TCheckBox;
    1819    CheckBoxStartMinimizedToTray: TCheckBox;
    1920    CheckBoxStartOnLogon: TCheckBox;
     
    2122    ComboBoxLanguage: TComboBox;
    2223    Label1: TLabel;
     24    Label2: TLabel;
     25    SpinEditDPI: TSpinEdit;
    2326    procedure ButtonOkClick(Sender: TObject);
     27    procedure CheckBoxAutomaticDPIChange(Sender: TObject);
    2428    procedure CheckBoxStartOnLogonChange(Sender: TObject);
    2529    procedure FormCreate(Sender: TObject);
     
    5862end;
    5963
     64procedure TFormSettings.CheckBoxAutomaticDPIChange(Sender: TObject);
     65begin
     66  UpdateInterface;
     67end;
     68
    6069procedure TFormSettings.CheckBoxStartOnLogonChange(Sender: TObject);
    6170begin
     
    7382  CheckBoxStartOnLogon.Checked := Core.StartOnLogon;
    7483  CheckBoxStartMinimizedToTray.Checked := Core.StartMinimizedToTray;
     84  CheckBoxAutomaticDPI.Checked := Core.ScaleDPI1.AutoDetect;
     85  SpinEditDPI.Value := Core.ScaleDPI1.DPI.X;
    7586  UpdateInterface;
    7687end;
     
    8192  Core.StartOnLogon := CheckBoxStartOnLogon.Checked;
    8293  Core.StartMinimizedToTray := CheckBoxStartMinimizedToTray.Checked;
     94  Core.ScaleDPI1.AutoDetect := CheckBoxAutomaticDPI.Checked;
     95  Core.ScaleDPI1.DPI := Point(SpinEditDPI.Value, SpinEditDPI.Value);
    8396end;
    8497
     
    8699begin
    87100  CheckBoxStartMinimizedToTray.Enabled := CheckBoxStartOnLogon.Checked;
     101  SpinEditDPI.Enabled := not CheckBoxAutomaticDPI.Checked;
     102  Label2.Enabled := not CheckBoxAutomaticDPI.Checked;
    88103end;
    89104
Note: See TracChangeset for help on using the changeset viewer.