|FAQ Index - Search - Recent Changes - Everything - Add entry|
21.12. How do themes work on win32?
- The standard location for themes is <GTK Folder>/share/themes. You can drop any theme you want in there.
- 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. Themes bluecurve, cleanice, galaxy, industrial, thincream, thinice, xfce, pixbuf have been successfully built and used - it should be quite straightforward if you have the GTK Dev package installed (Tyler used Visual C++ 6, Fabien used MinGW).
A patch was submitted to sourceforge to request the inclusion of the precompiled engines and associated themes in the main distro a while ago; check the patches page on [sourceforge.net] .
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):
- Rename the theme folder in share/themes to 'Default'. This will then be the one used on the next execution of your GTK app.
- Copy the gtkrc from the theme directory you want into <GTK Folder>/etc/gtk-2.0. (I also tried putting a shortcut in there instead, to no effect - would have been nice though).
- (From the source) Put a .gtk-2.0rc (not sure of exact name at the moment) in your 'HOME' folder. The issue here is that every version of Windows gives you a different 'HOME' location. On my XP box, it is <SYSTEM DRIVE>/Documents and Settings/<USERNAME>.
With the second choice there is less room for error since you do not have to rename folders: you simply copy one file into a different location. To get back to the original settings you just delete that gtkrc from the etc/gtk-2.0 folder.
If you don't want to tweak with rc files, there also a GUI program by Alex Shaduri to preview and select the theme and font to be used by all GTK apps. It's called "gtk2_prefs" and you will find it at [members.lycos.co.uk] (version 0.2.0 was current as of this writing).
Note that all themes mostly work with some off-by-one glitch drawing seen on the right of some borders.
(Tyler Wilson, Fabien Coutant)