Changeset 16 for trunk/Forms
- Timestamp:
- Feb 28, 2018, 9:44:51 AM (7 years ago)
- Location:
- trunk/Forms
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormMain.lfm
r15 r16 36 36 AnchorSideTop.Control = CoolBar1 37 37 Left = 24 38 Height = 2 238 Height = 28 39 39 Top = 5 40 Width = 1 0540 Width = 132 41 41 Align = alNone 42 42 AutoSize = True … … 56 56 end 57 57 object ToolButton2: TToolButton 58 Left = 2458 Left = 30 59 59 Top = 0 60 60 Action = Core.AFileOpen … … 63 63 end 64 64 object ToolButton3: TToolButton 65 Left = 5965 Left = 74 66 66 Top = 0 67 67 Action = Core.AFileSave 68 68 end 69 69 object ToolButton4: TToolButton 70 Left = 8270 Left = 103 71 71 Top = 0 72 72 Action = Core.AFileClose … … 77 77 AnchorSideTop.Control = CoolBar1 78 78 Left = 188 79 Height = 2 279 Height = 28 80 80 Top = 5 81 Width = 2481 Width = 59 82 82 Align = alNone 83 83 AutoSize = True … … 92 92 Transparent = True 93 93 object ToolButton5: TToolButton 94 Left = 30 95 Top = 0 96 Action = Core.ASettings 97 end 98 object ToolButton6: TToolButton 94 99 Left = 1 95 100 Top = 0 96 Action = Core.A Settings101 Action = Core.AFindDuplicate 97 102 end 98 103 end … … 159 164 Action = Core.ASettings 160 165 end 166 object MenuItem4: TMenuItem 167 Action = Core.AFindDuplicate 168 end 161 169 end 162 170 object MenuItemHelp: TMenuItem -
trunk/Forms/UFormMain.pas
r15 r16 18 18 MenuItem1: TMenuItem; 19 19 MenuItem3: TMenuItem; 20 MenuItem4: TMenuItem; 20 21 MenuItemToolbar: TMenuItem; 21 22 MenuItemView: TMenuItem; … … 43 44 ToolButton4: TToolButton; 44 45 ToolButton5: TToolButton; 46 ToolButton6: TToolButton; 45 47 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); 46 48 procedure FormCloseQuery(Sender: TObject; var CanClose: boolean); … … 49 51 procedure MenuItemToolbarClick(Sender: TObject); 50 52 private 53 procedure SetToolbarHints; 51 54 procedure UpdateFormTitle; 52 55 public … … 83 86 84 87 procedure TFormMain.FormCreate(Sender: TObject); 85 var86 I: Integer;87 88 begin 88 for I := 0 to ToolBarFile.ButtonCount - 1 do89 ToolBarFile.Buttons[I].Hint := ToolBarFile.Buttons[I].Caption;90 89 end; 91 90 92 91 procedure TFormMain.FormShow(Sender: TObject); 93 92 begin 93 SetToolbarHints; 94 94 Core.Initialize; 95 95 Core.ThemeManager1.UseTheme(Self); … … 103 103 begin 104 104 UpdateInterface; 105 end; 106 107 procedure TFormMain.SetToolbarHints; 108 var 109 I: Integer; 110 J: Integer; 111 Control: TControl; 112 begin 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; 105 122 end; 106 123 -
trunk/Forms/UFormSettings.lfm
r15 r16 10 10 Constraints.MinWidth = 400 11 11 DesignTimePPI = 120 12 OnClose = FormClose 12 13 OnCreate = FormCreate 13 14 OnShow = FormShow -
trunk/Forms/UFormSettings.pas
r15 r16 28 28 procedure CheckBoxAutomaticDPIChange(Sender: TObject); 29 29 procedure CheckBoxStartOnLogonChange(Sender: TObject); 30 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); 30 31 procedure FormCreate(Sender: TObject); 31 32 procedure FormShow(Sender: TObject); … … 53 54 procedure TFormSettings.FormShow(Sender: TObject); 54 55 begin 56 Core.PersistentForm1.Load(Self); 57 55 58 Core.CoolTranslator1.LanguageListToStrings(ComboBoxLanguage.Items); 56 59 ComboBoxLanguage.ItemIndex := ComboBoxLanguage.Items.IndexOfObject(Core.CoolTranslator1.Language); … … 78 81 begin 79 82 UpdateInterface; 83 end; 84 85 procedure TFormSettings.FormClose(Sender: TObject; var CloseAction: TCloseAction 86 ); 87 begin 88 Core.PersistentForm1.Save(Self); 80 89 end; 81 90
Note:
See TracChangeset
for help on using the changeset viewer.