Draw the background of the toolbox hbox

This commit is contained in:
Marco Pesenti Gritti 2007-05-18 13:32:50 +02:00
parent 7b9c59fb9c
commit b958a515d5
2 changed files with 13 additions and 2 deletions

View File

@ -1,6 +1,6 @@
VERSION=0.63
DATE=`date +%Y%m%d`
RELEASE=2.86
RELEASE=2.87
TARBALL=sugar-$VERSION-$RELEASE.${DATE}git.tar.bz2
rm sugar-$VERSION.tar.bz2

View File

@ -35,6 +35,16 @@ class Toolbox(gtk.VBox):
self.pack_start(self._notebook)
self._notebook.show()
def _toolbar_box_expose_cb(self, widget, event):
widget.style.paint_flat_box(widget.window,
gtk.STATE_NORMAL, gtk.SHADOW_NONE,
event.area, widget, 'toolbox',
widget.allocation.x,
widget.allocation.y,
widget.allocation.width,
widget.allocation.height)
return False
def add_toolbar(self, name, toolbar):
label = gtk.Label(name)
label.set_size_request(gtk.gdk.screen_width() / _N_TABS, -1)
@ -42,6 +52,7 @@ class Toolbox(gtk.VBox):
toolbar_box = gtk.HBox()
toolbar_box.pack_start(toolbar, True, True, units.grid_to_pixels(1))
toolbar_box.connect('expose-event', self._toolbar_box_expose_cb)
self._notebook.append_page(toolbar_box, label)
toolbar_box.show()