diff options
author | Simon Schampijer <simon@schampijer.de> | 2008-02-25 23:32:27 (GMT) |
---|---|---|
committer | Simon Schampijer <simon@schampijer.de> | 2008-02-25 23:32:27 (GMT) |
commit | bdbdc5bc874b298e524e78299136ba9b3ad7e1e8 (patch) | |
tree | d28f53e2d3513b4687161ba34cd6e864274d5899 /sugar/graphics | |
parent | ee4a4ece7c1524c22a201ac7a086d3cb71554c24 (diff) |
Make the text in the toolbar of the toolbox dependant on the text size
and minimum style.TOOLBOX_TAB_LABEL_WIDTH
Diffstat (limited to 'sugar/graphics')
-rw-r--r-- | sugar/graphics/toolbox.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sugar/graphics/toolbox.py b/sugar/graphics/toolbox.py index 4171d00..e5ae141 100644 --- a/sugar/graphics/toolbox.py +++ b/sugar/graphics/toolbox.py @@ -60,7 +60,8 @@ class Toolbox(gtk.VBox): def add_toolbar(self, name, toolbar): label = gtk.Label(name) - label.set_size_request(style.TOOLBOX_TAB_LABEL_WIDTH, -1) + width, height = label.size_request() + label.set_size_request(max(width, style.TOOLBOX_TAB_LABEL_WIDTH), -1) label.set_alignment(0.0, 0.5) event_box = gtk.EventBox() |