Editor-Color-Opts: button to toolbar

git-svn-id: trunk@27701 -
This commit is contained in:
martin 2010-10-14 01:18:19 +00:00
parent 5ebba3c501
commit 61112f9973
2 changed files with 23 additions and 21 deletions

View File

@ -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'

View File

@ -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