[geary] Second half of revert of toolbar button size: Refs bgo#723578



commit cf7a3e58153b88f2ed8c0766b848c9c3a8a10299
Author: Jim Nelson <jim yorba org>
Date:   Tue Feb 4 12:00:05 2014 -0800

    Second half of revert of toolbar button size: Refs bgo#723578
    
    This code must also remain, as it deals with situations where
    spacers are placed before or after the linked buttons.

 src/client/components/pill-toolbar.vala |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/src/client/components/pill-toolbar.vala b/src/client/components/pill-toolbar.vala
index 8bbe18c..6a094b1 100644
--- a/src/client/components/pill-toolbar.vala
+++ b/src/client/components/pill-toolbar.vala
@@ -81,6 +81,22 @@ public class PillToolbar : Gtk.Toolbar {
         foreach(Gtk.Button button in buttons)
             box.add(button);
         
+        int i = 0;
+        foreach(Gtk.Button button in buttons) {
+             box.add(button);
+            
+            // Place the right spacer on the button itself.  This way if the button is not displayed,
+            // the spacer will not appear.
+            if (i == buttons.size - 1 && after_spacer) {
+                if (button.get_direction() == Gtk.TextDirection.RTL)
+                    button.set_margin_left(12);
+                else
+                    button.set_margin_right(12);
+            }
+            
+            i++;
+        }
+        
         Gtk.ToolItem tool_item = new Gtk.ToolItem();
         tool_item.add(box);
         


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