[gnome-clocks/bilelmoussaoui/adaptive-headerbar] Flatpak: use libhandy from master



commit f68a9560e84127646fbba05bf763ba04bde6fe41
Author: Bilal Elmoussaoui <bil elmoussaoui gmail com>
Date:   Thu Sep 26 15:53:21 2019 +0000

    Flatpak: use libhandy from master

 build-aux/flatpak/org.gnome.clocks.json |  3 +--
 src/application.vala                    |  2 ++
 src/window.vala                         | 15 ++++++++-------
 3 files changed, 11 insertions(+), 9 deletions(-)
---
diff --git a/build-aux/flatpak/org.gnome.clocks.json b/build-aux/flatpak/org.gnome.clocks.json
index 4925fa8..81523d2 100644
--- a/build-aux/flatpak/org.gnome.clocks.json
+++ b/build-aux/flatpak/org.gnome.clocks.json
@@ -89,8 +89,7 @@
                "sources": [
                        {
                                "type": "git",
-                               "url": "https://source.puri.sm/Librem5/libhandy.git";,
-                               "tag": "v0.0.11"
+                               "url": "https://source.puri.sm/Librem5/libhandy.git";
                        }
                ]
         },
diff --git a/src/application.vala b/src/application.vala
index 1668901..ca7d4dd 100644
--- a/src/application.vala
+++ b/src/application.vala
@@ -119,6 +119,8 @@ public class Application : Gtk.Application {
 
         Utils.load_main_css ();
 
+        set_resource_base_path("/org/gnome/clocks/");
+
         var theme = Gtk.IconTheme.get_default ();
         theme.add_resource_path("/org/gnome/clocks/icons");
 
diff --git a/src/window.vala b/src/window.vala
index bfadde6..a03396c 100644
--- a/src/window.vala
+++ b/src/window.vala
@@ -98,13 +98,6 @@ public class Window : Gtk.ApplicationWindow {
             update_header_bar ();
         });
 
-        this.size_allocate.connect((widget, allocation) => {
-            switcher_bar.set_reveal(allocation.width < 500);
-            squeezer.set_child_enabled(title_wide_switcher, allocation.width > 800);
-            squeezer.set_child_enabled(title_narrow_switcher, allocation.width > 500);
-            squeezer.set_child_enabled(title_text, allocation.width <= 500);
-        });
-
         var header_bar_id = header_bar.notify["mode"].connect (() => {
             update_header_bar ();
         });
@@ -173,6 +166,14 @@ public class Window : Gtk.ApplicationWindow {
         }
     }
 
+    public override void size_allocate (Gtk.Allocation allocation) {
+        base.size_allocate (allocation);
+        switcher_bar.set_reveal (allocation.width <= 500);
+        squeezer.set_child_enabled (title_wide_switcher, allocation.width > 800);
+        squeezer.set_child_enabled (title_narrow_switcher, allocation.width > 500);
+        squeezer.set_child_enabled (title_text, allocation.width <= 500);
+    }
+
     private void on_show_primary_menu_activate (SimpleAction action) {
         var state = action.get_state ().get_boolean ();
         action.set_state (new Variant.boolean (!state));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]