Changeset 180 for trunk


Ignore:
Timestamp:
Apr 5, 2018, 10:23:46 AM (7 years ago)
Author:
chronos
Message:
  • Fixed: Remember visibility setting of StatusBar.
  • Modified: Set toolbars hints in separate method.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.pas

    r177 r180  
    148148    procedure FilterList(List: TListObject);
    149149    procedure OpenRecentClick(Sender: TObject);
     150    procedure SetToolbarHints;
    150151  public
    151152    procedure LoadConfig;
     
    188189{ TFormMain }
    189190
    190 procedure TFormMain.FormCreate(Sender: TObject);
     191procedure TFormMain.SetToolbarHints;
    191192var
    192193  I: Integer;
    193 begin
    194   for I := 0 to ToolBarFile.ButtonCount - 1 do
    195     ToolBarFile.Buttons[I].Hint := ToolBarFile.Buttons[I].Caption;
    196   for I := 0 to ToolBarManage.ButtonCount - 1 do
    197     ToolBarManage.Buttons[I].Hint := ToolBarManage.Buttons[I].Caption;
    198   for I := 0 to ToolBarOther.ButtonCount - 1 do
    199     ToolBarOther.Buttons[I].Hint := ToolBarOther.Buttons[I].Caption;
    200   for I := 0 to ToolBarFilter.ButtonCount - 1 do
    201     ToolBarFilter.Buttons[I].Hint := ToolBarFilter.Buttons[I].Caption;
     194  J: Integer;
     195  Control: TControl;
     196begin
     197 for J := 0 to CoolBar1.ControlCount - 1 do begin
     198    Control := CoolBar1.Controls[J];
     199    if Control is TToolBar then begin
     200      for I := 0 to TToolBar(Control).ButtonCount - 1 do begin
     201        TToolBar(Control).Buttons[I].ShowHint := True;
     202        TToolBar(Control).Buttons[I].Hint := TToolBar(Control).Buttons[I].Caption;
     203      end;
     204    end;
     205  end;
     206end;
     207
     208procedure TFormMain.FormCreate(Sender: TObject);
     209begin
     210  SetToolbarHints;
    202211  PanelMain.ControlStyle := PanelMain.ControlStyle + [csOpaque];
    203212  PanelParam.ControlStyle := PanelParam.ControlStyle + [csOpaque];
     
    736745    AFilterEnabledCategories.Checked := ReadBoolWithDefault('EnabledCategories', False);
    737746    MenuItemToolbar.Checked := ReadBoolWithDefault('ToolBarVisible', True);
    738     MenuItemStatusBar.Checked := ReadBoolWithDefault('StatuslBarVisible', True);
     747    MenuItemStatusBar.Checked := ReadBoolWithDefault('StatusBarVisible', True);
    739748    MenuItemParam.Checked := ReadBoolWithDefault('FilterParamVisible', True);
    740749    MenuItemShowItemsWithoutFilter.Checked :=
Note: See TracChangeset for help on using the changeset viewer.