From 48abd46ed9fe95b58b298c621b5b737f7c42824f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danielle=20For=C3=A9?= Date: Fri, 1 Mar 2024 10:22:17 -0800 Subject: [PATCH 1/2] Handle own titlebuttons --- src/DisplayPlug.vala | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/DisplayPlug.vala b/src/DisplayPlug.vala index 08392aaa..0da22f01 100644 --- a/src/DisplayPlug.vala +++ b/src/DisplayPlug.vala @@ -63,11 +63,6 @@ public class Display.Plug : Switchboard.Plug { } var stack_switcher = new Gtk.StackSwitcher () { - halign = Gtk.Align.CENTER, - margin_top = 12, - margin_end = 12, - margin_bottom = 12, - margin_start = 12, stack = stack }; @@ -78,8 +73,14 @@ public class Display.Plug : Switchboard.Plug { switcher_child = switcher_child.get_next_sibling (); } + var headerbar = new Adw.HeaderBar () { + title_widget = stack_switcher + }; + headerbar.add_css_class (Granite.STYLE_CLASS_FLAT); + + box = new Gtk.Box (VERTICAL, 0); - box.append (stack_switcher); + box.append (headerbar); box.append (stack); stack.notify["visible-child"].connect (() => { From 0a2dbe3fa861a1b18fd17635e38f9ad2a733435f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danielle=20For=C3=A9?= Date: Fri, 1 Mar 2024 10:23:46 -0800 Subject: [PATCH 2/2] Update DisplayPlug.vala --- src/DisplayPlug.vala | 1 - 1 file changed, 1 deletion(-) diff --git a/src/DisplayPlug.vala b/src/DisplayPlug.vala index 0da22f01..a73c4b24 100644 --- a/src/DisplayPlug.vala +++ b/src/DisplayPlug.vala @@ -78,7 +78,6 @@ public class Display.Plug : Switchboard.Plug { }; headerbar.add_css_class (Granite.STYLE_CLASS_FLAT); - box = new Gtk.Box (VERTICAL, 0); box.append (headerbar); box.append (stack);