A new default theme for GTK+

This has been a long time coming. We’ve wanted to replace the default GTK+ theme for a very long time.

-#define DEFAULT_THEME_NAME "Raleigh"
+#define DEFAULT_THEME_NAME "Adwaita"

The Raleigh theme that we’ve used as the default until now has some advantages:

  • It is very simple
  • No dependency on a theme engine (external or internal)
  • It does not use a lot of resources

But there is no nice way of putting it: it is very ugly.

Raleigh

This may not  be such a big deal on Linux, where distributions generally have ‘their’ theme, not to mention the many packaged and readily available themes.  So, basically no Linux user ever sees the default GTK+ theme. The situation is very different on other platforms, where GTK+ is often bundled with applications, and it may not be easy to install themes, or get the bundled GTK+ to use them.

For a very long time, we’ve held onto the belief that the theming system is a way to make applications blend smoothly into the platform, and that there should be a native theme for each major platform that GTK+ can run on.

This is a great idea in theory. In practice, it has not worked out so well.  The one platform where we have a native theme is Windows, and even though the ms-windows theme has received much appreciated attention and updates by Руслан Ижбулатов  this cycle, it is still incomplete and has problems with some recent GTK+ features.

(No need to panic though. Even if it is no longer the default, the ms-windows theme will still be available.)

Adwaita on the other hand,  is a very complete theme that has received a lot of attention over the last three years. Not only does it support all recent GTK+ features, many of the CSS improvements that the GTK+ theming machinery has received in the last years were direct responses to the needs of the Adwaita designers.

Adwaita
With Adwaita, GTK+ applications can rely on having a 100% complete theme that will look and feel the same on all supported platforms.  A theme that is constantly receiving a lot of love and attention and keeps up with new GTK+ features.

Another big plus: Adwaita has a high-quality dark variant, which will now also be available everywhere.

Adwaita dark

So, why not do this switch earlier ? After all, Adwaita has been around for a while.

The main reason is that we did not want to lose the ‘no theme engine’ characteristic of the default theme.  Theme engines, and loadable modules in general, are something we’ve been moving away from for a while now. They are

  •  questionable from a security perspective (executable code thats shipped separately, inserted into all your applications)
  • associated with search path problems
  • require stable APIs for many things that are more or less internal

(No reason to panic, though. Theme engines will not stop working overnight in GTK+ 3.)

The alternative to engines that we want themes to use is CSS. Our CSS implementation has only recently become powerful enough to replace the last features from the Adwaita theme engine  (focus rectangles and menu shadows). That is why we are doing the switch now.

One of consequences of moving Adwaita into GTK+ is that we will no longer ship application-specific theming as part of the theme (many core GNOME applications currently have small amounts of CSS glue inside gnome-themes-standard). Where this is still relevant, applications should just install it themselves. Here is an example for how to do this.

Thanks for the huge amount of recent work on Adwaita go to Jakub Steiner, Lapo Calamandrei, Jon McCann and Cosimo Cecchi.

17 thoughts on “A new default theme for GTK+”

  1. Awesome stuff going on with Gnome shell.
    But there are problems with GTK3 usurping GPU memory in gnome 3.12, among others….some face it some do not….again depending on hardware.

    This ‘bug’ is a regression. I dont know how this is better than anything in the GTK2 stack…

    XFCE 4.10 has surpassed in quality versus gnome 2.3xx…….all this while still using GTK2.

    I dont know how javascript and CSS will make things easier. Isn’t javascript a CPU hogger?
    On top of that its not easy to configure.

    KDE, now is fully mature.

    If you are aware, everyone is slowly boycotting the GTK quandary—- and headed over to qt for simplicity and structural rigidity. Razorqt is an example. XFCE may head over to GTK3 eventually but nothing stops them from sampling qt.

    As far as I see it GTK3 is bloatware unless you have an argument.

    There are big things going on besides GTK3 in linux….another example is wayland and weston…but this still gets beaten black and blue with Xorg, XFCE and compton. Compton is hardly a few Kilobytes in size….which is next to nothing as far as overhead is concerned.

    How is GTK 3 supposed to run on cheaper laptops. Are HSA and opencl going to be used for running a desktop??…these will ease out any overhead…but obviously I think not.

    Regards,
    Pam.

    1. I have absolutely no idea what you’re going on about. GTK+ is not using the GPU (unless Cairo has access to an accelerated XRENDER implementation), or OpenCL. this is actually one of the major sticking point: we *want* GTK+ to use a GPU.

      1. By GPU i meant Opengl.
        Gnome 3.8 and now even 3.12 have the same bug wherein, now Im not sure whether the GL related API’s have a bug or driver related(NVIDIA) or some other issue…. wherein slowly the GPU memory fills up. You have to press ‘r’ in the run dialog to reload and dump memory from gnome-shell.

    2. I think you incorrectly inferred that JavaScript had anything to do with this blog post.

  2. Thanks!

    Raleigh had a tendency to surface on linux when using X11 forwarding or when you had some problem early in the login process and a dialog box popped up informing you of an error, so seeing it go is a blessing 🙂

  3. I was sort of excited until you mentioned Adwaita.
    I thought that was the default GTK+ theme and sort of forgot there was that other one.

  4. Concerning Руслан Ижбулатов … I know it is awesome we finally all use Unicode, so we can use native shapes of names without transliteration (and I am more and more certain my own name will be delivered to the reader in the manner I expect it to be), but … How many readers of this blog actually can read this (I can, being risen up in the Communist Czechoslovakia)? Do they know, what’s the difference between б and в (which one of them is the equivalent of the Latin ‘b’)? I would probably rather stay with transliteration and write his name as Ruslan Izhbulatov.

    1. As a general rule I try to keep names unmolested when referring to somebody. And since I only know him as lrn on irc, I copied his name from a git commit message.

  5. Adwaita theme developing will now take place only inside GTK and you will drop gnome-themes-standard?

    1. Wasn’t that just a name change? It went take place inside GTK it will just be the default theme

  6. The color picker regressed in Adwaita, IMO. The color perception is unadulterated in the Raleigh variant — the color boxes are exactly the same. Whereas the colored border & shapes distort the color perception in Adwaita.

  7. Bye bye Raleigh. Long life Adwaita.
    A redesigned API needs a modern theme.
    Thank you guys for all of this GTK eye-candy.

Comments are closed.