change style of 'open file' button to dropdown

This commit is contained in:
riva 2024-04-18 14:37:16 +03:00
parent 1b2030685d
commit 66e78fb3c6
2 changed files with 9 additions and 4 deletions

View File

@ -1454,7 +1454,6 @@ object fmMain: TfmMain
Left = 96
Top = 0
Action = acFontOpen
PopupMenu = pmLastFiles
end
object ToolButton6: TToolButton
Left = 126
@ -2579,7 +2578,6 @@ object fmMain: TfmMain
Caption = 'Открыть недавний'
DisableIfNoHandler = False
Hint = 'Список ранее открытых файлов'
ImageIndex = 1
Visible = False
end
object acDeleteLastFilesList: TAction

View File

@ -1131,8 +1131,15 @@ procedure TfmMain.LastFileAdd(FileName: String);
end;
if acLastFilesList.Visible then
ToolBtnLastFiles.PopupMenu := pmLastFiles else
ToolBtnLastFiles.PopupMenu := nil;
begin
ToolBtnLastFiles.DropdownMenu := pmLastFiles;
ToolBtnLastFiles.Style := tbsDropDown;
end
else
begin
ToolBtnLastFiles.DropdownMenu := nil;
ToolBtnLastFiles.Style := tbsButton;
end;
end;
end;