Created
December 8, 2023 12:28
-
-
Save imhemish/5124e5ce4f369fe1a7d652753582abb7 to your computer and use it in GitHub Desktop.
Menu inside a headerbar (Gtk4 with blueprint)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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