|
In pygobject there is a border around the images that makes the button more than expected. I want to create a panel with 24 pixels high, I put a ToggleButton with an icon of 22 pixels. I got pygtk to leave things as they wanted, but now will not. Other widgets also have this problem. wnck the tasklist and pager for example. If there are many buttons in tasklist they do not shrink!
What alternatives do I have?
#!/usr/bin/python from gi.repository import Gtk
w = Gtk.Window() w.set_size_request(24,24) w.connect("destroy",Gtk.main_quit)
b = Gtk.ToggleButton() i = Gtk.Image() i.set_from_icon_name("start-here",Gtk.IconSize.LARGE_TOOLBAR) b.set_image(i) # or b.add(i)
w.add(b) w.show_all() Gtk.main()
|