From a5bd7936939e7af010929243bd9ac127fde6dd67 Mon Sep 17 00:00:00 2001 From: Florian RICHER Date: Wed, 18 Oct 2023 18:56:01 +0200 Subject: [PATCH] Migrate window.ui to window.blp --- src/window.blp | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/src/window.blp b/src/window.blp index 082cfb5..ca28e1e 100644 --- a/src/window.blp +++ b/src/window.blp @@ -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"; } }