diff options
author | Gonzalo Odiard <godiard@gmail.com> | 2013-06-11 13:31:45 (GMT) |
---|---|---|
committer | Gonzalo Odiard <godiard@gmail.com> | 2013-06-11 13:31:45 (GMT) |
commit | 6a526539ecba64f56a03ba61b7b6f0f20e87dcab (patch) | |
tree | 65db3fd7dcc0823ba5eb330d8c7551e5ff4582ec | |
parent | c306408805bfa69e3c2606e181a77c04483960db (diff) |
Fix vertical size of the FontSize widget
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
-rw-r--r-- | fontcombobox.py | 15 |
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) |