Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar/graphics
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@localhost.localdomain>2007-05-01 10:41:22 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2007-05-01 10:41:22 (GMT)
commitc5f7f1d8af708471603985910773f4a9126ebe5b (patch)
tree860912ff62fcd22bec514d7a85b158cc15aab769 /sugar/graphics
parent63f5f55050e3df5974a0a60d3240827ef7258030 (diff)
Make tabs fixed size
Diffstat (limited to 'sugar/graphics')
-rw-r--r--sugar/graphics/toolbox.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/sugar/graphics/toolbox.py b/sugar/graphics/toolbox.py
index 6dd805f..70cb051 100644
--- a/sugar/graphics/toolbox.py
+++ b/sugar/graphics/toolbox.py
@@ -20,6 +20,8 @@ import gobject
from sugar.graphics.toolbutton import ToolButton
+_N_TABS = 8
+
class Toolbox(gtk.VBox):
__gtype_name__ = 'SugarToolbox'
def __init__(self):
@@ -33,7 +35,10 @@ class Toolbox(gtk.VBox):
self._notebook.show()
def add_toolbar(self, name, toolbar):
- self._notebook.append_page(toolbar, gtk.Label(name))
+ label = gtk.Label(name)
+ label.set_size_request(gtk.gdk.screen_width() / _N_TABS, -1)
+ label.set_alignment(0.0, 0.5)
+ self._notebook.append_page(toolbar, label)
def remove_toolbar(self, index):
self._notebook.remove_page(index)