Skip to content

Commit 5fc9112

Browse files
jeremypwlenemter
andauthored
Sidebar: Put stack and toast in overlay (#1647)
* Sidebar: Put stack and toast in overlay * Update src/Widgets/Sidebar.vala Remove whitespace Co-authored-by: Leo <lenemter@gmail.com> --------- Co-authored-by: Leo <lenemter@gmail.com>
1 parent 43b17af commit 5fc9112

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

src/Widgets/Sidebar.vala

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ public class Code.Sidebar : Gtk.Grid {
5050
};
5151

5252
cloning_success_toast = new Granite.Widgets.Toast (_("Cloning complete")) {
53-
halign = END
53+
halign = CENTER,
54+
valign = START
5455
};
5556

5657
headerbar = new Hdy.HeaderBar () {
@@ -62,6 +63,11 @@ public class Code.Sidebar : Gtk.Grid {
6263
stack = new Gtk.Stack ();
6364
stack.transition_type = Gtk.StackTransitionType.SLIDE_LEFT_RIGHT;
6465

66+
var overlay = new Gtk.Overlay () {
67+
child = stack
68+
};
69+
overlay.add_overlay (cloning_success_toast);
70+
6571
stack_switcher = new Gtk.StackSwitcher ();
6672
stack_switcher.no_show_all = true;
6773
stack_switcher.visible = false;
@@ -95,9 +101,8 @@ public class Code.Sidebar : Gtk.Grid {
95101
actionbar.pack_start (project_menu_button);
96102

97103
add (headerbar);
98-
add (cloning_success_toast);
99104
add (stack_switcher);
100-
add (stack);
105+
add (overlay);
101106
add (actionbar);
102107

103108
stack.add.connect (() => {

0 commit comments

Comments
 (0)