[gnome-clocks/bilelmoussaoui/redesign: 5/10] Correctly switch between the views of the stack switcher
- From: Bilal Elmoussaoui <bilelmoussaoui src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-clocks/bilelmoussaoui/redesign: 5/10] Correctly switch between the views of the stack switcher
- Date: Fri, 20 Sep 2019 19:13:40 +0000 (UTC)
commit 300f97f2787014381c37b164d72e41a59d6f3ac5
Author: Bilal Elmoussaoui <bil elmoussaoui gmail com>
Date: Wed Sep 18 20:13:55 2019 +0200
Correctly switch between the views of the stack switcher
src/window.vala | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/src/window.vala b/src/window.vala
index a891611..d0791e0 100644
--- a/src/window.vala
+++ b/src/window.vala
@@ -105,11 +105,10 @@ public class Window : Gtk.ApplicationWindow {
update_header_bar ();
});
this.size_allocate.connect((widget, allocation) => {
- if (allocation.width > 500) {
- switcher_bar.set_reveal(false);
- } else {
- switcher_bar.set_reveal(true);
- }
+ switcher_bar.set_reveal(allocation.width < 450);
+ squeezer.set_child_enabled(title_wide_switcher, allocation.width > 800);
+ squeezer.set_child_enabled(title_narrow_switcher, allocation.width > 450);
+ squeezer.set_child_enabled(title_text, allocation.width <= 450);
});
stack.destroy.connect(() => {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]