Changeset 105 for trunk/Forms


Ignore:
Timestamp:
Oct 11, 2016, 3:56:47 PM (8 years ago)
Author:
chronos
Message:
  • Added: Hidden settings of DPI.
Location:
trunk/Forms
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.lfm

    r104 r105  
    11object FormMain: TFormMain
    2   Left = 449
     2  Left = 520
    33  Height = 447
    4   Top = 396
     4  Top = 378
    55  Width = 782
    66  Caption = 'Acronym Decoder'
  • trunk/Forms/UFormSettings.lfm

    r96 r105  
    7474    TabOrder = 5
    7575  end
     76  object CheckBoxAutomaticDPI: TCheckBox
     77    Left = 18
     78    Height = 24
     79    Top = 191
     80    Width = 120
     81    Caption = 'Automatic DPI'
     82    OnChange = CheckBoxAutomaticDPIChange
     83    TabOrder = 6
     84    Visible = False
     85  end
     86  object SpinEditDPI: TSpinEdit
     87    Left = 96
     88    Height = 28
     89    Top = 221
     90    Width = 97
     91    MaxValue = 300
     92    MinValue = 96
     93    TabOrder = 7
     94    Value = 96
     95    Visible = False
     96  end
     97  object Label2: TLabel
     98    Left = 48
     99    Height = 20
     100    Top = 221
     101    Width = 26
     102    Caption = 'DPI:'
     103    ParentColor = False
     104    Visible = False
     105  end
    76106end
  • trunk/Forms/UFormSettings.lrt

    r70 r105  
    66TFORMSETTINGS.CHECKBOXSTARTONLOGON.CAPTION=Start on user logon
    77TFORMSETTINGS.CHECKBOXSTARTMINIMIZEDTOTRAY.CAPTION=Start minimized to tray
     8TFORMSETTINGS.CHECKBOXAUTOMATICDPI.CAPTION=Automatic DPI
     9TFORMSETTINGS.LABEL2.CAPTION=DPI:
  • 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.