mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 18:20:43 +09:00
LibGUI: Add MenuBar::add_menu(name)
This allows us to construct menus in a more natural way: auto& file_menu = menubar->add_menu("File"); file_menu.add_action(...); Instead of the old way: auto file_menu = GUI::Menu::construct(); file_menu->add_action(...); menubar->add_menu(file_menu);
This commit is contained in:
parent
faac43597a
commit
26eeaef0a8
Notes:
sideshowbarker
2024-07-19 07:56:34 +09:00
Author: https://github.com/awesomekling
Commit: 26eeaef0a8
26 changed files with 261 additions and 331 deletions
|
@ -37,7 +37,8 @@ public:
|
|||
MenuBar();
|
||||
~MenuBar();
|
||||
|
||||
void add_menu(NonnullRefPtr<Menu>);
|
||||
Menu& add_menu(String name);
|
||||
void append_menu(NonnullRefPtr<Menu>);
|
||||
|
||||
void notify_added_to_application(Badge<Application>);
|
||||
void notify_removed_from_application(Badge<Application>);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue