mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 17:15:28 +00:00
implement popover menu
This commit is contained in:
parent
cd011cbe60
commit
37f109bec4
2 changed files with 34 additions and 4 deletions
|
|
@ -9,7 +9,28 @@ namespace app::browser::header::bar::menu
|
|||
// Init dependencies
|
||||
this->menu = menu;
|
||||
|
||||
// Init GTK
|
||||
this->gtk = gtk_popover_new();
|
||||
// Init GMenu Model
|
||||
this->_model = g_menu_new();
|
||||
|
||||
// Init menu items
|
||||
this->quit = new main::Quit(
|
||||
this
|
||||
);
|
||||
|
||||
g_menu_append_item(
|
||||
G_MENU(
|
||||
this->_model
|
||||
),
|
||||
G_MENU_ITEM(
|
||||
this->quit->item
|
||||
)
|
||||
);
|
||||
|
||||
// Create a new GtkPopoverMenu from the GMenuModel
|
||||
this->gtk = gtk_popover_menu_new_from_model(
|
||||
G_MENU_MODEL(
|
||||
this->_model
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue