Changeset 16 for trunk/Forms


Ignore:
Timestamp:
Feb 28, 2018, 9:44:51 AM (7 years ago)
Author:
chronos
Message:
  • Added: New Tools action Find duplicates.
Location:
trunk/Forms
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.lfm

    r15 r16  
    3636      AnchorSideTop.Control = CoolBar1
    3737      Left = 24
    38       Height = 22
     38      Height = 28
    3939      Top = 5
    40       Width = 105
     40      Width = 132
    4141      Align = alNone
    4242      AutoSize = True
     
    5656      end
    5757      object ToolButton2: TToolButton
    58         Left = 24
     58        Left = 30
    5959        Top = 0
    6060        Action = Core.AFileOpen
     
    6363      end
    6464      object ToolButton3: TToolButton
    65         Left = 59
     65        Left = 74
    6666        Top = 0
    6767        Action = Core.AFileSave
    6868      end
    6969      object ToolButton4: TToolButton
    70         Left = 82
     70        Left = 103
    7171        Top = 0
    7272        Action = Core.AFileClose
     
    7777      AnchorSideTop.Control = CoolBar1
    7878      Left = 188
    79       Height = 22
     79      Height = 28
    8080      Top = 5
    81       Width = 24
     81      Width = 59
    8282      Align = alNone
    8383      AutoSize = True
     
    9292      Transparent = True
    9393      object ToolButton5: TToolButton
     94        Left = 30
     95        Top = 0
     96        Action = Core.ASettings
     97      end
     98      object ToolButton6: TToolButton
    9499        Left = 1
    95100        Top = 0
    96         Action = Core.ASettings
     101        Action = Core.AFindDuplicate
    97102      end
    98103    end
     
    159164        Action = Core.ASettings
    160165      end
     166      object MenuItem4: TMenuItem
     167        Action = Core.AFindDuplicate
     168      end
    161169    end
    162170    object MenuItemHelp: TMenuItem
  • trunk/Forms/UFormMain.pas

    r15 r16  
    1818    MenuItem1: TMenuItem;
    1919    MenuItem3: TMenuItem;
     20    MenuItem4: TMenuItem;
    2021    MenuItemToolbar: TMenuItem;
    2122    MenuItemView: TMenuItem;
     
    4344    ToolButton4: TToolButton;
    4445    ToolButton5: TToolButton;
     46    ToolButton6: TToolButton;
    4547    procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
    4648    procedure FormCloseQuery(Sender: TObject; var CanClose: boolean);
     
    4951    procedure MenuItemToolbarClick(Sender: TObject);
    5052  private
     53    procedure SetToolbarHints;
    5154    procedure UpdateFormTitle;
    5255  public
     
    8386
    8487procedure TFormMain.FormCreate(Sender: TObject);
    85 var
    86   I: Integer;
    8788begin
    88   for I := 0 to ToolBarFile.ButtonCount - 1 do
    89     ToolBarFile.Buttons[I].Hint := ToolBarFile.Buttons[I].Caption;
    9089end;
    9190
    9291procedure TFormMain.FormShow(Sender: TObject);
    9392begin
     93  SetToolbarHints;
    9494  Core.Initialize;
    9595  Core.ThemeManager1.UseTheme(Self);
     
    103103begin
    104104  UpdateInterface;
     105end;
     106
     107procedure TFormMain.SetToolbarHints;
     108var
     109  I: Integer;
     110  J: Integer;
     111  Control: TControl;
     112begin
     113 for J := 0 to CoolBar1.ControlCount - 1 do begin
     114    Control := CoolBar1.Controls[J];
     115    if Control is TToolBar then begin
     116      for I := 0 to TToolBar(Control).ButtonCount - 1 do begin
     117        TToolBar(Control).Buttons[I].ShowHint := True;
     118        TToolBar(Control).Buttons[I].Hint := TToolBar(Control).Buttons[I].Caption;
     119      end;
     120    end;
     121  end;
    105122end;
    106123
  • trunk/Forms/UFormSettings.lfm

    r15 r16  
    1010  Constraints.MinWidth = 400
    1111  DesignTimePPI = 120
     12  OnClose = FormClose
    1213  OnCreate = FormCreate
    1314  OnShow = FormShow
  • trunk/Forms/UFormSettings.pas

    r15 r16  
    2828    procedure CheckBoxAutomaticDPIChange(Sender: TObject);
    2929    procedure CheckBoxStartOnLogonChange(Sender: TObject);
     30    procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
    3031    procedure FormCreate(Sender: TObject);
    3132    procedure FormShow(Sender: TObject);
     
    5354procedure TFormSettings.FormShow(Sender: TObject);
    5455begin
     56  Core.PersistentForm1.Load(Self);
     57
    5558  Core.CoolTranslator1.LanguageListToStrings(ComboBoxLanguage.Items);
    5659  ComboBoxLanguage.ItemIndex := ComboBoxLanguage.Items.IndexOfObject(Core.CoolTranslator1.Language);
     
    7881begin
    7982  UpdateInterface;
     83end;
     84
     85procedure TFormSettings.FormClose(Sender: TObject; var CloseAction: TCloseAction
     86  );
     87begin
     88  Core.PersistentForm1.Save(Self);
    8089end;
    8190
Note: See TracChangeset for help on using the changeset viewer.