Opkman: Reposition main toolbar according to it's buttons visibility.

git-svn-id: trunk@53814 -
This commit is contained in:
balazs 2016-12-31 09:50:59 +00:00
parent 54b90fc39f
commit f6593483e2

View File

@ -395,6 +395,7 @@ begin
tbCreate.Left := tbOptions.Left - 10;
tbCreate.Enabled := (AEnable);
end;
pnToolBarResize(pnToolbar);
tbOptions.Enabled := (AEnable);
tbHelp.Enabled := (AEnable);
end;
@ -792,7 +793,8 @@ var
begin
W := 0;
for I := 0 to tbButtons.ButtonCount - 1 do
W := W + tbButtons.Buttons[I].Width;
if tbButtons.Buttons[I].Visible then
W := W + tbButtons.Buttons[I].Width;
tbButtons.Width := W + 2;
if tbButtons.Width < 450 then
tbButtons.Width := 450;