[geary] Fix composer detach button position & visibility on custom setups.



commit 67e8a8ab93ce1a4f81d5b60a9241317f4bbc9a25
Author: Michael James Gratton <mike vee net>
Date:   Thu Apr 12 11:36:18 2018 +1000

    Fix composer detach button position & visibility on custom setups.
    
    Fixes Bug 793710.
    
    * src/client/composer/composer-headerbar.vala (ComposerHeaderbar): Ensure
      we actually get notified when the user changes their decoration prefs
      and update detach button location correctly.
    
    * ui/composer-headerbar.ui: Make start detach button's image visible by
      default.

 src/client/composer/composer-headerbar.vala |    6 ++++--
 ui/composer-headerbar.ui                    |    1 +
 2 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/client/composer/composer-headerbar.vala b/src/client/composer/composer-headerbar.vala
index e2ff91a..a947b02 100644
--- a/src/client/composer/composer-headerbar.vala
+++ b/src/client/composer/composer-headerbar.vala
@@ -46,8 +46,10 @@ public class ComposerHeaderbar : Gtk.HeaderBar {
         bind_property("show-pending-attachments", conversation_attach_buttons, "visible",
             BindingFlags.SYNC_CREATE);
 
-        notify["decoration-layout"].connect(set_detach_button_side);
-        realize.connect(set_detach_button_side);
+        set_detach_button_side();
+        Gtk.Settings.get_default().notify["gtk-decoration-layout"].connect(
+            () => { set_detach_button_side(); }
+        );
     }
 
     public void set_recipients(string label, string tooltip) {
diff --git a/ui/composer-headerbar.ui b/ui/composer-headerbar.ui
index ef8cbb2..d333755 100644
--- a/ui/composer-headerbar.ui
+++ b/ui/composer-headerbar.ui
@@ -21,6 +21,7 @@
             <property name="always_show_image">True</property>
             <child>
               <object class="GtkImage" id="detach_start_image">
+                <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="pixel_size">16</property>
                 <property name="icon_name">detach-symbolic</property>


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