Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGonzalo Odiard <godiard@gmail.com>2013-06-11 13:31:45 (GMT)
committer Gonzalo Odiard <godiard@gmail.com>2013-06-11 13:31:45 (GMT)
commit6a526539ecba64f56a03ba61b7b6f0f20e87dcab (patch)
tree65db3fd7dcc0823ba5eb330d8c7551e5ff4582ec
parentc306408805bfa69e3c2606e181a77c04483960db (diff)
Fix vertical size of the FontSize widget
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
-rw-r--r--fontcombobox.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/fontcombobox.py b/fontcombobox.py
index d636dff..f930d4c 100644
--- a/fontcombobox.py
+++ b/fontcombobox.py
@@ -211,11 +211,19 @@ class FontSize(Gtk.ToolItem):
self._font_sizes = [8, 9, 10, 11, 12, 14, 16, 20, 22, 24, 26, 28, 36,
48, 72]
+ # theme the buttons, can be removed if add the style to the sugar css
+ if style.zoom(100) == 100:
+ subcell_size = 15
+ default_padding = 6
+ else:
+ subcell_size = 11
+ default_padding = 4
+
hbox = Gtk.HBox()
vbox = Gtk.VBox()
self.add(vbox)
# add a vbox to set the padding up and down
- vbox.pack_start(hbox, True, True, 4)
+ vbox.pack_start(hbox, True, True, default_padding)
self._size_up = Gtk.Button()
icon = Icon(icon_name='resize+')
self._size_up.set_image(icon)
@@ -235,11 +243,6 @@ class FontSize(Gtk.ToolItem):
self._size_down.connect('clicked', self.__font_sizes_cb, False)
hbox.pack_start(self._size_down, False, False, 5)
- # theme the buttons, can be removed if add the style to the sugar css
- if style.zoom(100) == 100:
- subcell_size = 15
- else:
- subcell_size = 11
radius = 2 * subcell_size
theme_up = "GtkButton {border-radius: %dpx 0px 0px %dpx;}" % (radius,
radius)