[clocks] Fix toolbar size to be constant and buttons to be rectangles



commit 1041d682a9f6c6a927b9bdd7811fed7c08bc219b
Author: Seif Lotfy <seif lotfy com>
Date:   Fri Aug 3 21:36:25 2012 +0200

    Fix toolbar size to be constant and buttons to be rectangles

 main.py |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/main.py b/main.py
index a546bdb..7f9599c 100644
--- a/main.py
+++ b/main.py
@@ -157,14 +157,15 @@ class ClocksToolbar (Gtk.Toolbar):
         self.newButton.add(label)
         
         self.leftBox = box = Gtk.Box ()
-        box.pack_start (self.newButton, False, False, 3)
+        box.pack_start (self.newButton, False, False, 0)
         toolbox.pack_start (box, True, True, 0)
         
         self.backButton = Gtk.Button ()
         icon = Gio.ThemedIcon.new_with_default_fallbacks ("go-previous-symbolic")
         image = Gtk.Image ()
-        image.set_from_gicon (icon, Gtk.IconSize.SMALL_TOOLBAR)
+        image.set_from_gicon (icon, Gtk.IconSize.MENU)
         self.backButton.add(image)
+        self.backButton.set_size_request (33, 33)
         self.backButton.connect ("clicked", lambda w: self.emit ("view-clock", self._buttonMap[self.last_widget]))
         
         self.newButton.connect("clicked", self._on_new_clicked)
@@ -186,11 +187,12 @@ class ClocksToolbar (Gtk.Toolbar):
         #self.applyButton.get_style_context ().add_class ('raised');
         icon = Gio.ThemedIcon.new_with_default_fallbacks ("object-select-symbolic")
         image = Gtk.Image ()
-        image.set_from_gicon (icon, Gtk.IconSize.SMALL_TOOLBAR)
+        image.set_from_gicon (icon, Gtk.IconSize.MENU)
         self.applyButton.add (image)
+        self.applyButton.set_size_request (32, 32)
         self.applyButton.connect('clicked', self._on_selection_mode)
         self.rightBox = box = Gtk.Box ()
-        box.pack_end (self.applyButton, False, False, 3)
+        box.pack_end (self.applyButton, False, False, 0)
         toolbox.pack_start (box, True, True, 0)
 
         self._buttonMap = {}
@@ -228,7 +230,7 @@ class ClocksToolbar (Gtk.Toolbar):
         self.newButton.hide ()
         self.applyButton.hide ()
         if not self.backButton.get_parent ():
-          self.leftBox.pack_start (self.backButton, False, False, 3)
+          self.leftBox.pack_start (self.backButton, False, False, 0)
         self.backButton.show_all ()
         self.city_label.show ()
 



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