mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:48:11 +00:00
LibGUI: Make MenuBar a Core::Object
This makes it show up in Inspector with all the menus inside it. :^)
This commit is contained in:
parent
a19690170f
commit
52a250cb61
28 changed files with 36 additions and 38 deletions
|
@ -43,14 +43,9 @@ MenuBar::~MenuBar()
|
|||
|
||||
Menu& MenuBar::add_menu(String name)
|
||||
{
|
||||
auto menu = Menu::construct(move(name));
|
||||
append_menu(menu);
|
||||
return *menu;
|
||||
}
|
||||
|
||||
void MenuBar::append_menu(NonnullRefPtr<Menu> menu)
|
||||
{
|
||||
m_menus.append(move(menu));
|
||||
auto& menu = add<Menu>(move(name));
|
||||
m_menus.append(menu);
|
||||
return menu;
|
||||
}
|
||||
|
||||
int MenuBar::realize_menubar()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue