More work on the new toolbars
This commit is contained in:
parent
d223579f22
commit
cb997a5264
@ -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
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user