diff --git a/ide/frames/editor_color_options.lfm b/ide/frames/editor_color_options.lfm index d093671ecb..002f6e82a4 100644 --- a/ide/frames/editor_color_options.lfm +++ b/ide/frames/editor_color_options.lfm @@ -517,6 +517,19 @@ inherited EditorColorOptionsFrame: TEditorColorOptionsFrame OnClick = tglGlobalChange Style = tbsCheck end + object SetAttributeToDefaultButton: TToolButton + Left = 131 + Top = 0 + OnClick = SetAttributeToDefaultButtonClick + ShowCaption = False + end + object ToolButton3: TToolButton + Left = 123 + Top = 0 + Width = 8 + Caption = 'ToolButton3' + Style = tbsSeparator + end end object ColumnPosBevel: TPanel AnchorSideLeft.Control = ForeGroundUseDefaultCheckBox @@ -1304,19 +1317,6 @@ inherited EditorColorOptionsFrame: TEditorColorOptionsFrame OnClick = SetAllAttributesToDefaultButtonClick ShowCaption = False end - object SetAttributeToDefaultButton: TToolButton - Left = 291 - Top = 0 - OnClick = SetAttributeToDefaultButtonClick - ShowCaption = False - end - object ToolButton1: TToolButton - Left = 287 - Top = 0 - Width = 4 - Caption = 'ToolButton1' - Style = tbsDivider - end end object ExportSaveDialog: TSaveDialog[4] DefaultExt = '.xml' diff --git a/ide/frames/editor_color_options.pas b/ide/frames/editor_color_options.pas index ea2d79a5ea..c2bc51e946 100644 --- a/ide/frames/editor_color_options.pas +++ b/ide/frames/editor_color_options.pas @@ -75,9 +75,9 @@ type ColorElementTree: TTreeView; ToolBar: TToolBar; ToolBar1: TToolBar; - ToolButton1: TToolButton; tbtnGlobal: TToolButton; tbtnLocal: TToolButton; + ToolButton3: TToolButton; UseSyntaxHighlightCheckBox: TToolButton; ToolButton2: TToolButton; LanguageButton: TToolButton; @@ -810,6 +810,7 @@ end; procedure TEditorColorOptionsFrame.ShowCurAttribute; var AttrToShow: TColorSchemeAttribute; + CanGlobal: Boolean; begin if (FCurHighlightElement = nil) or UpdatingColor then Exit; @@ -817,16 +818,16 @@ begin DisableAlign; try - ToolBar1.Enabled := (FCurHighlightElement.GetSchemeGlobal <> nil) and + CanGlobal := (FCurHighlightElement.GetSchemeGlobal <> nil) and not FIsEditingDefaults; - tbtnGlobal.Enabled := ToolBar1.Enabled; - tbtnLocal.Enabled := ToolBar1.Enabled; - tbtnGlobal.AllowAllUp := not ToolBar1.Enabled; - tbtnLocal.AllowAllUp := not ToolBar1.Enabled; + tbtnGlobal.Enabled := CanGlobal; + tbtnLocal.Enabled := CanGlobal; + tbtnGlobal.AllowAllUp := not CanGlobal; + tbtnLocal.AllowAllUp := not CanGlobal; tbtnGlobal.Down := FCurHighlightElement.IsUsingSchemeGlobals and - ToolBar1.Enabled; + CanGlobal; tbtnLocal.Down := (not FCurHighlightElement.IsUsingSchemeGlobals) and - ToolBar1.Enabled; + CanGlobal; AttrToShow := FCurHighlightElement; if FCurHighlightElement.IsUsingSchemeGlobals then @@ -1292,6 +1293,7 @@ begin UpdatingColor := False; FCurHighlightElement := nil; ToolBar.Images := IDEImages.Images_16; + ToolBar1.Images := IDEImages.Images_16; Items := TStringList.Create; try