QGtkStyle, now on Windows too!

There are a lot of Qt styles that have been created by enthusiasts - QtCurve, Oxygen, Bespin and as latest addition to the library - QGtkStyle (excellent job, Jens!), which makes a bunch of Gtk themes available to Qt. But wait a second - all these styles are mainly used by Linux people! What about people suffering with Windows? Here is the answer - if you feel geek enough to compile Qt and the style yourself and if you want your application to look different (read: "beautiful") - you can try the new QGtkStyle_win32 available on labs (it is a separate project for now):

svn://labs.trolltech.com/svn/styles/gtkstyle_win32

I've tested it with two Gtk theme engines - wimp (which is distributed with Gimp and emulates the WindowsXP style - yes, it is crazy to use the Gtk theme engine on WindowsXP through qgtkstyle to emulate WindowsXP theme ;). The second theme engine I've tried is murrine, which was quite easy to compile on Windows. It's time for some screenshots:
gtkstyle_windows.png

WindowsXP style (the one that is deployed with Gimp)

browser demo with WindowsXP style through QGtkStyle and wimp theme engine.

You can even run the Perforce Visual Client with it! (however it crashes sometimes - looks like the perforce guys made some binary incompatible changes to the Qt libraries they ship with their app).

p4v.PNG

To try it out you will need a Gtk development package
You can either use Qt compiled with Visual C++ or MinGW, however in the latter case you need to recompile Qt with the "-mms-bitfields" compiler option to make it binary compatible with the Gtk libraries.
Afterwards just put your gtkstyle(d).dll in the plugin path (either %QTDIR%pluginsstyles or <application directory>pluginsstyles) and launch your application with the "-style gtk" command-line option. (and make sure you have both mingwm10.dll and gtk libraries in your system path!).
At this point you should be able to run Qt apps with the default Gtk theme, so the next step is to compile the murrine Gtk2 theme engine. For this step you need the patch to be able to compile murrine on Windows. Then just put the libmurrine.dll to the Gtk engines directory <gtk root>libgtk-2.02.10.0engines) and you are ready to use Murrine Themes!

P.S. of course native Gtk file dialogs are also available on Windows ;)

standarddialogs.PNG


Blog Topics:

Comments