Moar windows themes!

Last time I blogged about the Gtk 3 windows theme we had just landed the initial support. It kinda worked but didn’t look quite right. Since then the css machinery has gotten a bit more capable, and I recently found some time to work on this again.

Testing had revealed that the theme was totally broken on Windows XP. This had two main causes; first of all there was some bugs in the Win32 theme APIs on XP when rendering to surfaces with alpha, and secondly the css file used some windows theme parts that only existed in Vista and later. I added workarounds for the alpha bug and introduced a new css file that is used on XP (although most of the css is shared). So, now XP support is working.

I also went through all the widgets, fixing a lot of details in how they render and adding theming for some less common widgets.

Here is how gtk3-widget-factory looks now:

Windows 7

Windows XP

Not bad for 998 lines of css.

This is all in the new Gtk+ 3.4.0 release. We hope to have window binaries out for it soon.

20 Responses to “Moar windows themes!”

  1. Lapo says:

    Getting a lot better, our custom widgets (switches and spinbuttons) needs a different stying I guess tho.

  2. Dom Lachowicz says:

    Well done, Alex!

  3. z says:

    Many thanks! Is there already a gtk3 installer available for windows?

  4. Johannes says:

    It looks better but still not really like Windows:

    * Shouldn’t we use the original windows stock icons (can we?)
    * The Spinbuttons clearly don’t look like their window equivalent.

    But otherwise great work!

  5. Awesome, looks better than GTK+ 2. I wonder how will render this in classic mode.

  6. alexl says:


    * Not sure how stock icons work on win32 actually, should look into it some day
    * The spinbuttons on Gtk+ in general were changed to look like that because the small buttons were just to small to hit. I’m not sure we want to re-introduce the problematic spinbutton layout just for the look on windows.

    Also, “not really like windows” is not really a good description. In the course of tweaking the theme I looked at a lot of apps and widgets in win32, and I there really is no singular “windows” look. Even among the standard apps that ships with windows there are multiple looks for almost all widgets except the trivial ones (buttons, etc). Its really busted.

  7. Francisco de la Peña says:


    You can load some win32 stock icons from shell32.dll resources.

  8. alexl says:

    Classic mode is unfortunately not supported yet. It will need another CSS file.

  9. Erwanb says:

    Very glad to read some good news about GTK3 Windows support ! =)

    Thanks for your work ! Can’t wait for the binairies !

  10. Guillaume says:

    Well done ! Looks great…

  11. G says:

    Very nice work.

    Just two things I wanna point out: The spin buttons (as said before) don’t look Windows at all. Also comboboxentry is waaay too big.

  12. […] support for CSS theming has also improved, that has in spin done it probable to broach more native-looking theming on Windows, despite usually in time for Windows 8 to pierce a goalposts with […]

  13. am says:

    Thanks for your work
    and i have a question too. do you have any plan for supporting drag and drop(i mean d&d between a gtk app and a third party app for example a browser. i think it needs OLE) in windows?

  14. I’m eagerly hoping for the GTK+ 3 Windows installer, so I can start looking at gtkmm 3 for Windows, and then creating a new Glom installer for Windows. Is there any news?

  15. alexl says:

    Murray: dieterv is working on the binaries. Not sure when they will be finished…

  16. Niklas says:

    Any news regarding the windows port? :)

  17. alexl says:

    Niklas: I know dieter is working on an official win32 binary release, but I don’t know the status of it.

  18. release says:

    This is all in the new Gtk+ 3.4.0 release. We hope to have window binaries out for it soon.

  19. Roland says:

    Hi alex,
    sorry for posting here but I didn’t find your e-mail… Could you contact me please…. I have some questions about glick2 and I am currently setting up a bundle based disitrbution based on Manjaro Linux…