More work on the new toolbars

This commit is contained in:
Marco Pesenti Gritti 2007-04-19 18:53:55 +02:00
parent d223579f22
commit cb997a5264
2 changed files with 19 additions and 0 deletions

View File

@ -4,3 +4,4 @@ gtk-font-name = "Bitstream Vera Sans 7"
gtk-icon-sizes = "gtk-menu=32,32:gtk-button=32,32"
gtk-cursor-theme-name = "olpc"
gtk-cursor-theme-size = 48
gtk-toolbar-style = GTK_TOOLBAR_ICONS

View File

@ -18,11 +18,29 @@
import gtk
class Toolbar(gtk.Toolbar):
def __init__(self):
gtk.Toolbar.__init__(self)
icon = gtk.ToolButton()
icon.set_icon_name('text-format-bold')
self.insert(icon, -1)
icon.show()
class Window(gtk.Window):
def __init__(self):
gtk.Window.__init__(self)
self.set_default_size(800, 600)
box = gtk.VBox()
self.add(box)
box.show()
toolbar = Toolbar()
box.pack_start(toolbar, False)
toolbar.show()
window = Window()
window.connect("destroy", lambda w: gtk.main_quit())
window.show()