Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar/graphics
diff options
context:
space:
mode:
authorSimon Schampijer <simon@schampijer.de>2008-02-25 23:32:27 (GMT)
committer Simon Schampijer <simon@schampijer.de>2008-02-25 23:32:27 (GMT)
commitbdbdc5bc874b298e524e78299136ba9b3ad7e1e8 (patch)
treed28f53e2d3513b4687161ba34cd6e864274d5899 /sugar/graphics
parentee4a4ece7c1524c22a201ac7a086d3cb71554c24 (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.py3
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()