From d6cb393d224593748554166cc7807fe7602646cb Mon Sep 17 00:00:00 2001 From: Bharat Date: Mon, 24 Jun 2024 20:04:17 +0530 Subject: [PATCH 1/5] library: Remove usage of Adw.PreferencesWindow Initial implementation to move away from Adw.PreferencesWindow for library Search non-functional as of now (Needs a different PR) --- src/Library/Library.blp | 110 ++++++++++++++++++++++------------------ 1 file changed, 62 insertions(+), 48 deletions(-) diff --git a/src/Library/Library.blp b/src/Library/Library.blp index 240898c9a..17c73e092 100644 --- a/src/Library/Library.blp +++ b/src/Library/Library.blp @@ -1,75 +1,89 @@ using Gtk 4.0; using Adw 1; -Adw.PreferencesWindow window { +Adw.Window window { hide-on-close: true; modal: false; - title: _("Workbench — Library"); default-height: 700; default-width: 700; - Adw.PreferencesPage { - Adw.PreferencesGroup { - Picture picture_illustration { - can-shrink: false; - margin-bottom: 32; - } + Adw.ToolbarView toolbar_view { - Label { - label: _("Learn, Test, Remix"); + [top] + Adw.HeaderBar header_bar { + title-widget: Adw.WindowTitle { + title: _("Workbench — Library"); + }; - styles [ - "title-1" - ] + [start] + ToggleButton button_search { + icon-name: "edit-find-symbolic"; } } - Adw.PreferencesGroup library_uncategorized {} + content: Adw.PreferencesPage { + Adw.PreferencesGroup { + Picture picture_illustration { + can-shrink: false; + margin-bottom: 32; + } - Adw.PreferencesGroup library_tools { - title: _("Tools"); - } + Label { + label: _("Learn, Test, Remix"); - Adw.PreferencesGroup library_network { - title: _("Network"); - } + styles [ + "title-1" + ] + } + } - Adw.PreferencesGroup library_controls { - title: _("Controls"); - } + Adw.PreferencesGroup library_uncategorized {} - Adw.PreferencesGroup library_layout { - title: _("Layout"); - } + Adw.PreferencesGroup library_tools { + title: _("Tools"); + } - Adw.PreferencesGroup library_feedback { - title: _("Feedback"); - } + Adw.PreferencesGroup library_network { + title: _("Network"); + } - Adw.PreferencesGroup library_navigation { - title: _("Navigation"); - } + Adw.PreferencesGroup library_controls { + title: _("Controls"); + } - Adw.PreferencesGroup library_user_interface { - title: _("User Interface"); - } + Adw.PreferencesGroup library_layout { + title: _("Layout"); + } - Adw.PreferencesGroup library_platform { - title: _("Platform APIs"); - } + Adw.PreferencesGroup library_feedback { + title: _("Feedback"); + } - Adw.PreferencesGroup { - vexpand: true; - valign: end; + Adw.PreferencesGroup library_navigation { + title: _("Navigation"); + } - Label { - label: _('All examples are dedicated to the public domain\nand can be used freely under the terms of CC0 1.0'); - use-markup: true; + Adw.PreferencesGroup library_user_interface { + title: _("User Interface"); + } - styles [ - "caption" - ] + Adw.PreferencesGroup library_platform { + title: _("Platform APIs"); } - } + + Adw.PreferencesGroup { + vexpand: true; + valign: end; + + Label { + label: _("All examples are dedicated to the public domain\nand can be used freely under the terms of CC0 1.0"); + use-markup: true; + + styles [ + "caption" + ] + } + } + }; } } From 2f23a29e6ed38a228f7987eee2e8b37dffa6e7f0 Mon Sep 17 00:00:00 2001 From: Bharat Date: Mon, 24 Jun 2024 20:51:22 +0530 Subject: [PATCH 2/5] minor change: Revert removed window title --- src/Library/Library.blp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Library/Library.blp b/src/Library/Library.blp index 17c73e092..27bebc7dd 100644 --- a/src/Library/Library.blp +++ b/src/Library/Library.blp @@ -4,6 +4,7 @@ using Adw 1; Adw.Window window { hide-on-close: true; modal: false; + title: _("Workbench — Library"); default-height: 700; default-width: 700; From 349ad2bfd1008ae9f2fec1617d84333e1579ce47 Mon Sep 17 00:00:00 2001 From: Bharat Date: Mon, 24 Jun 2024 21:27:14 +0530 Subject: [PATCH 3/5] minor change: Remove search icon Reimplementing search would be a different PR --- src/Library/Library.blp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/Library/Library.blp b/src/Library/Library.blp index 27bebc7dd..a0944c3c4 100644 --- a/src/Library/Library.blp +++ b/src/Library/Library.blp @@ -15,11 +15,6 @@ Adw.Window window { title-widget: Adw.WindowTitle { title: _("Workbench — Library"); }; - - [start] - ToggleButton button_search { - icon-name: "edit-find-symbolic"; - } } content: Adw.PreferencesPage { From 9c5055cc08a7620fe3146358aea548b9c008fd94 Mon Sep 17 00:00:00 2001 From: Bharat Date: Mon, 24 Jun 2024 21:44:43 +0530 Subject: [PATCH 4/5] minor fix: remove extra space --- src/Library/Library.blp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Library/Library.blp b/src/Library/Library.blp index a0944c3c4..e0a17e639 100644 --- a/src/Library/Library.blp +++ b/src/Library/Library.blp @@ -9,7 +9,6 @@ Adw.Window window { default-width: 700; Adw.ToolbarView toolbar_view { - [top] Adw.HeaderBar header_bar { title-widget: Adw.WindowTitle { From 957daf6dd930e236f6755029ac1f3d2052cc3c66 Mon Sep 17 00:00:00 2001 From: Sonny Piers Date: Tue, 25 Jun 2024 00:37:59 +0200 Subject: [PATCH 5/5] fix ci --- demos | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demos b/demos index bb5df9b69..0db011334 160000 --- a/demos +++ b/demos @@ -1 +1 @@ -Subproject commit bb5df9b69152334e67dc79a31db4e7f0ba884141 +Subproject commit 0db011334ad15bfc60ef4aaca6c90a1dec7d705c