Migrate window.ui to window.blp
This commit is contained in:
parent
d9a1433cc2
commit
a5bd793693
1 changed files with 12 additions and 15 deletions
|
@ -1,47 +1,44 @@
|
|||
using Gtk 4.0;
|
||||
using Adw 1;
|
||||
|
||||
template TutorialWindow : Adw.ApplicationWindow {
|
||||
title: _("My Application");
|
||||
default-width: 800;
|
||||
default-height: 600;
|
||||
template $TutorialWindow : Adw.ApplicationWindow {
|
||||
default-width: 600;
|
||||
default-height: 300;
|
||||
|
||||
Adw.ToolbarView {
|
||||
content: Adw.ToolbarView {
|
||||
|
||||
[top]
|
||||
Adw.HeaderBar header_bar {
|
||||
|
||||
|
||||
[end]
|
||||
Gtk.MenuButton {
|
||||
menu-model: primary_menu;
|
||||
primary: True;
|
||||
icon: "open-menu-symbolic";
|
||||
primary: true;
|
||||
icon-name: "open-menu-symbolic";
|
||||
tooltip-text: _("Menu");
|
||||
}
|
||||
}
|
||||
|
||||
Gtk.Label {
|
||||
content: Gtk.Label label {
|
||||
styles ["title-1"]
|
||||
label: "Hello, World!";
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
menu primary_menu {
|
||||
section {
|
||||
item {
|
||||
label: _("Preferences");
|
||||
label: _("_Preferences");
|
||||
action: "app.preferences";
|
||||
}
|
||||
|
||||
item {
|
||||
label: _("Keyboard Shortcuts");
|
||||
label: _("_Keyboard Shortcuts");
|
||||
action: "win.show-help-overlay";
|
||||
}
|
||||
|
||||
item {
|
||||
label: _("About");
|
||||
label: _("_About Tutorial");
|
||||
action: "app.about";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue