ADD: Show divider as button property

This commit is contained in:
Alexander Koblov 2009-02-01 11:34:36 +00:00
commit e5386935d7
2 changed files with 7 additions and 1 deletions

View file

@ -65,6 +65,7 @@ type
FCheckToolButton : Boolean;
FFlatButtons: Boolean;
FDiskPanel: Boolean;
FDividerAsButton: Boolean;
FChangePath : String;
FEnvVar : String;
FOldWidth : Integer;
@ -120,6 +121,7 @@ type
property FlatButtons : Boolean read FFlatButtons write SetFlatButtons default False;
property IsDiskPanel : Boolean read FDiskPanel write FDiskPanel default False;
property ButtonGlyphSize : Integer read FIconSize write FIconSize;
property ShowDividerAsButton: Boolean read FDividerAsButton write FDividerAsButton default False;
property ChangePath : String read FChangePath write FChangePath;
property EnvVar : String read FEnvVar write FEnvVar;
@ -479,7 +481,7 @@ begin
for I := 1 to BtnCount do
begin
sMenu:= IniFile.ReadString('Buttonbar', 'menu' + IntToStr(I), '');
if sMenu = '-' then
if (sMenu = '-') and not FDividerAsButton then
AddDivider
else
AddButton('', GetCmdDirFromEnvVar(IniFile.ReadString('Buttonbar', 'cmd' + IntToStr(I), '')),
@ -565,6 +567,9 @@ begin
//WriteLN('ToolDivider.Left == ' + IntToStr(ToolButton.Left));
if Assigned(OnMouseUp) then
ToolDivider.OnMouseUp:= OnMouseUp;
FPositionX:= FPositionX + ToolDivider.Width;
ToolDivider.Tag:= FButtonsList.Add(ToolDivider);

View file

@ -376,6 +376,7 @@ object frmConfigToolBar: TfrmConfigToolBar
OnLoadButtonGlyph = ktbBarLoadButtonGlyph
CheckToolButton = True
ButtonGlyphSize = 16
ShowDividerAsButton = True
end
end
object pnlToolBarFileName: TPanel