From bdbdc5bc874b298e524e78299136ba9b3ad7e1e8 Mon Sep 17 00:00:00 2001 From: Simon Schampijer Date: Mon, 25 Feb 2008 23:32:27 +0000 Subject: Make the text in the toolbar of the toolbox dependant on the text size and minimum style.TOOLBOX_TAB_LABEL_WIDTH --- (limited to 'sugar/graphics') 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() -- cgit v0.9.1