From 0aa1dd86561121d82051dcdd6a818a1d80ebf4f7 Mon Sep 17 00:00:00 2001 From: Jeremy Wootten Date: Fri, 17 Oct 2025 16:07:13 +0000 Subject: [PATCH 1/2] Sidebar: Put stack and toast in overlay --- src/Widgets/Sidebar.vala | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/Widgets/Sidebar.vala b/src/Widgets/Sidebar.vala index 89c604cf4..949e10fd5 100644 --- a/src/Widgets/Sidebar.vala +++ b/src/Widgets/Sidebar.vala @@ -50,7 +50,8 @@ public class Code.Sidebar : Gtk.Grid { }; cloning_success_toast = new Granite.Widgets.Toast (_("Cloning complete")) { - halign = END + halign = CENTER, + valign = START }; headerbar = new Hdy.HeaderBar () { @@ -62,6 +63,12 @@ public class Code.Sidebar : Gtk.Grid { stack = new Gtk.Stack (); stack.transition_type = Gtk.StackTransitionType.SLIDE_LEFT_RIGHT; + var overlay = new Gtk.Overlay () { + child = stack + }; + + overlay.add_overlay (cloning_success_toast); + stack_switcher = new Gtk.StackSwitcher (); stack_switcher.no_show_all = true; stack_switcher.visible = false; @@ -95,9 +102,8 @@ public class Code.Sidebar : Gtk.Grid { actionbar.pack_start (project_menu_button); add (headerbar); - add (cloning_success_toast); add (stack_switcher); - add (stack); + add (overlay); add (actionbar); stack.add.connect (() => { From 170d5314c34dee04bf7bbe8c380a3d9835a9ad63 Mon Sep 17 00:00:00 2001 From: Jeremy Wootten Date: Sat, 18 Oct 2025 17:24:48 +0100 Subject: [PATCH 2/2] Update src/Widgets/Sidebar.vala Remove whitespace Co-authored-by: Leo --- src/Widgets/Sidebar.vala | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Widgets/Sidebar.vala b/src/Widgets/Sidebar.vala index 949e10fd5..2f95327ea 100644 --- a/src/Widgets/Sidebar.vala +++ b/src/Widgets/Sidebar.vala @@ -66,7 +66,6 @@ public class Code.Sidebar : Gtk.Grid { var overlay = new Gtk.Overlay () { child = stack }; - overlay.add_overlay (cloning_success_toast); stack_switcher = new Gtk.StackSwitcher ();