Wine theming (follow up)

Roderick Colenbrander thunderbird2k at
Tue Nov 4 17:15:25 CST 2008


The way to go for Wine theming is to use Windows XP themes. Unfortunately the file format itself is not documented. Based on Wine its uxtheme code (BTW our uxtheme is quite complete) and an analysis of some 'free' XP themes like 'ClearLook' I was able to write my own theme template.

First of all for I want to warn all people who want to write Wine themes. A Windows theme consists of colors, font sizes, bitmaps and dimensions of controls. Windows theme editors use XP themes as a template for creating new themes, so even if you find a 'free' theme it is in the end derived from a Microsoft theme and most of the time Luna. Myself I analyzed the clearlooks and some other free ones just to understand Wine's uxtheme code. If you want to write themes use the uxtheme code as your reference. For instance dlls/uxtheme/stylemap.c shows which properties are allowed on each control. If a property on lets say a button is called 'CONTENTMARGINS' themes useally type 'ContentMargins',

Anyway now to the theme file I created. A theme file is a resource file which contains various sections. They contain the names of the builtin color schemes, font sizes and of course the actual theme data. The theme data itself is stored in ini files. Most themes offer differ font sizes and colors and for each combination there is a ini file.

The theme file I made only consists of a 'SysMetrics' section which contains the 'classic' color names which can also be adjusted from the Control Panel\\Colors registry location. The difference is that in XP Microsoft cleaned up the names, so some of the names have changed. The theme is compiled using mingw because right now winecfg seems to need a real 'MZ' header.

A lot of work is needed especially in comctl32 and also in uxtheme its drawing code to optimize the drawing performance and to properly render themes. For this purpose you should use some free native XP themes and try them to render properly in Wine. The uxtheme drawing code needs to handle margins, locations and positions properly. Right now in case of a button comctl32 is making assumptions about text locations and I don't think that belongs there.

Hopefully some people will step up to create Wine themes and improve utheme and our theme drawing. Myself I envision a 'winetheme.msstyles' which contains some GTK and QT color themes.

"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winetheme.tar.gz
Type: application/x-compressed-tar
Size: 2019 bytes
Desc: not available
Url : 

More information about the wine-devel mailing list