Skip to content

Instantly share code, notes, and snippets.

@imhemish
Created December 8, 2023 12:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save imhemish/5124e5ce4f369fe1a7d652753582abb7 to your computer and use it in GitHub Desktop.
Save imhemish/5124e5ce4f369fe1a7d652753582abb7 to your computer and use it in GitHub Desktop.
Menu inside a headerbar (Gtk4 with blueprint)
using Gtk 4.0;
using Adw 1;
menu menu {
submenu {
label: _("File");
item {
label: _("New");
action: "app.new";
}
item {
label: _("Save");
action: "app.save";
}
}
submenu {
label: _("Edit");
item {
label: _("Preferences");
action: "app.new";
}
item {
label: _("Copy");
action: "app.save";
}
}
}
Box welcome {
orientation: vertical;
[start]
Adw.HeaderBar {
Gtk.Button {
icon-name: "open-menu-symbolic";
}
Gtk.PopoverMenuBar {
menu-model: menu;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment