[pygtk] pyGTK + windows + skins
Fabien.Coutant at steria.com
Thu Mar 18 20:46:52 WST 2004
Hi! Since I use GTK2 for a project at work I can give some advice on
On Thursday, 18 March 2004, you (Tyler W. Wilson) wrote:
| - The standard location for themes is <GTK Folder>/2.0/share/themes. You
| can drop any theme you want in there.
More exactly the location is <GTK folder>/share/themes.
| - Theme engines go into <GTK Folder>/lib/gtk-2.0/2.2.0/engines. The only
| one included in the standard package is libwimp.dll. I have successfully
| built and used cleanice and xfce - it was quite straightforward if you
| have the GTK Dev package installed (I used Visual C++ 6).
Right. I have personally successfully built several engines with MinGW
+ MSYS + some hand tweaking: bluecurve, cleanice, galaxy, industrial,
thincream, thinice, xfce, pixbuf (aka pixmap in GTK1).
I also got other engines from a previous GTK/Win32 distro:
lighthouseblue, metal, mist, redmond95, smooth, wimp. I think all Unix
engines compile easily on Windows too, except maybe QtPixmap.
All themes mostly work with some off-by-one glitch drawing seen on the
right of some borders. I have submitted a patch to sourceforge to
request their inclusion in the main distro a while ago, with no luck.
Check the patches page on http://sourceforge.net/projects/gtk-win/ (I
had to split the file in 4 parts).
| The tricky bit is how to tell GTK on Windows which theme to use. There
| are at least 3 ways to do this (though I have only tested 2):
| I was hoping to build a little theme-switcher in PyGTK, but have not
| found the proper incantations to tell an application to redraw itself (I
| am new at this PyGTK thing).
System-wide wise, you have to edit <GTK folder>/etc/gtk-2.0/gtkrc and
place an include directive inside for your wanted theme's gtkrc.
You can do it by hand or more easily use use gtk2_prefs by Alex Shaduri
from http://members.lycos.co.uk/alexv6/, which will also let you change
the font to use.
Hope this helps,
More information about the pygtk