[pygtk] Custom theme

Dieter Verfaillie dieterv at optionexplicit.be
Wed Jun 30 00:40:30 WST 2010


Hi,

> I call gtk.rc_parse('relative path to gtkrc') before
> doing anything else in my main program.  What I get is that a few of the
> widgets have the correct style, but most have the default style for the
> desktop.  Any idea what I'm doing wrong?

I suspect you're parsing the gtkrc of the theme itself (the one
in /share/themes) instead of overriding the configuration
in /etc/gtk-2.0/gtkrc

Try the following instead, replacing Raleigh with the name of the
theme you want to use:

rc_string = 'gtk-theme-name = "Raleigh"'
# Or, if you want an icon theme as well
#rc_string = 'gtk-theme-name = "Raleigh"\ngtk-icon-theme-name = "Tango"'
gtk.rc_parse_string(rc_string)

hth,
Dieter

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.



More information about the pygtk mailing list