[pygtk] Theming widgets
Scott Horowitz
stonecrest at gmail.com
Sat Aug 26 14:54:31 WST 2006
I'm essentially trying to make a throbber (like the firefox rotating
image) for an application. It's easy enough to put the throbber
gtk.Image in a hbox with the menubar, but the menubar in my gtk theme
(Murrine) looks quite a bit different than the gtk.Image. In trying to
make the gtk.Image have the same style as the menubar, I have the
following code:
setting = self.menubar.get_settings()
style = gtk.rc_get_style_by_paths(setting, self.menubar.path(),
self.menubar.class_path(), gtk.MenuBar)
self.throbber.set_style(style)
If I then print self.throbber.get_style(), I get:
<__main__.MurrineStyle object (MurrineStyle) at 0xb7861cd4>
That seems very promising since it references my gtk theme. However,
the gtk.Image looks no different than before applying this style. Am I
doing something wrong, or is it not possible to achieve the desired
effect?
Thanks,
Scott Horowitz
More information about the pygtk
mailing list