1
0
Fork 0
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:
Andreas Kling 2020-04-04 12:18:40 +02:00
parent faac43597a
commit 26eeaef0a8
Notes: sideshowbarker 2024-07-19 07:56:34 +09:00
26 changed files with 261 additions and 331 deletions

View file

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