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 Gtk 4.0;
|
||||||
using Adw 1;
|
using Adw 1;
|
||||||
|
|
||||||
template TutorialWindow : Adw.ApplicationWindow {
|
template $TutorialWindow : Adw.ApplicationWindow {
|
||||||
title: _("My Application");
|
default-width: 600;
|
||||||
default-width: 800;
|
default-height: 300;
|
||||||
default-height: 600;
|
|
||||||
|
|
||||||
Adw.ToolbarView {
|
content: Adw.ToolbarView {
|
||||||
|
|
||||||
[top]
|
[top]
|
||||||
Adw.HeaderBar header_bar {
|
Adw.HeaderBar header_bar {
|
||||||
|
|
||||||
|
|
||||||
[end]
|
[end]
|
||||||
Gtk.MenuButton {
|
Gtk.MenuButton {
|
||||||
menu-model: primary_menu;
|
menu-model: primary_menu;
|
||||||
primary: True;
|
primary: true;
|
||||||
icon: "open-menu-symbolic";
|
icon-name: "open-menu-symbolic";
|
||||||
tooltip-text: _("Menu");
|
tooltip-text: _("Menu");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Gtk.Label {
|
content: Gtk.Label label {
|
||||||
styles ["title-1"]
|
styles ["title-1"]
|
||||||
label: "Hello, World!";
|
label: "Hello, World!";
|
||||||
}
|
};
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
menu primary_menu {
|
menu primary_menu {
|
||||||
section {
|
section {
|
||||||
item {
|
item {
|
||||||
label: _("Preferences");
|
label: _("_Preferences");
|
||||||
action: "app.preferences";
|
action: "app.preferences";
|
||||||
}
|
}
|
||||||
|
|
||||||
item {
|
item {
|
||||||
label: _("Keyboard Shortcuts");
|
label: _("_Keyboard Shortcuts");
|
||||||
action: "win.show-help-overlay";
|
action: "win.show-help-overlay";
|
||||||
}
|
}
|
||||||
|
|
||||||
item {
|
item {
|
||||||
label: _("About");
|
label: _("_About Tutorial");
|
||||||
action: "app.about";
|
action: "app.about";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue