Monday, October 19, 2009

Some work on GNUstep theme support...

Quentin came to visit london this weekend, and he thus forced^H^H^H^H^H^Hconvainced me to work again on gnustep, on the theming support. GNUstep had the possibility to use themes using my theme bundle, Camaelon. But this had some technical issues (though we do use it in Étoilé), mostly that it's easy for Camaelon to be out of sync with the current GNUstep implementation. Richard Frith-Macdonald has thus started to implement some theme support directly into GNUstep, and even wrote a theming application to help creating themes. But the support is still limited -- you can change images, colors, and the drawing of some widgets but not all.

Anyway, what I did this weekend was quite a bit of refactoring in the theming code dealing with pixmaps -- things should be much clearer now. I also added an implementation for Nine Patch pixmaps, which basically makes creating custom themes a lot more simple. For example, the following content in a theme's Info-gnustep.plist will be enough -- no need to have multiple files as with Camaelon, no need to measure things...


GSThemeTiles = {
NSButton = {
NinePatch = YES;
FileName = NSButton.tiff
};
};


With a button made in five minutes of Gimp work (as can be seen!):




An example of the result: