How Ubuntu damages GNOME with their GTK Theme

alex285
8 min readAug 3, 2018

--

Hello! Here we go again against Canonical, but quite truthfully when it comes to GNOME, this company has simply perfected the bad idea :p

However this isn’t just about Canonical but for every Linux vendor who creates third party GNOME/GTK themes, like System76 and Pop!_OS for example. Ubuntu though, has the biggest user base, thus the biggest impact, and therefore gets the most attraction

Stole image from WTF!Ubuntu! b/c he steals mine :p

This isn’t an Adwaita Vs Yaru, and personally I’d love to have themes, and I guess everyone would like that, but I just don’t see it possible, at least not on GTK 3.0 and GTK 4.0

Why another theme?

Before I start with the problems, I will try to investigate why Canonical choose to create a GNOME theme (Yaru) instead of going with Adwaita; GNOME’s default

1. “Branding”

That’s not really my opinion, but something I have read enough times. Company releases software and they just want to “copyright / distinguish” it as theirs

Sounds normal, only that Canonical doesn’t release anything (even their contributions are small), everything is released by GNOME and others, and quite frankly they aren’t exactly interested to Linux desktop either

Most importantly it is ridiculous to “branding” by theme. Does Huawei try to change Android apps theme? Would they if they could? Does Red Hat care about?

Do even Ubuntu users care about recognizability? I would say quite the opposite. Linux users typically like the upstream, except if downstream does significantly better

Sidenote. Many times I’m getting this comment on my videos “Whats your theme? So cool!” and it is just Adwaita Dark, that people don’t know because of Ubuntu :)

2. They don’t like Adwaita

That’s a more valid reason. Company doesn’t like software, so they fork it. But before they fork it, they usually try to work upstream, something that Canonical never did

Right now it doesn’t even matter if Adwaita theme looks good or bad, because the actual code is a huge mess, politely a disgrace of SASS and nearly impossible to maintain

Canonical could start contributing on that super bad code, try to make it look like a normal SASS project, and in the process they could change the “look” too. This is how basically works: You contribute for some time, you become a maintainer, and then you have a voice inside GNOME project to change things

Instead, Canonical took Adwaita stylesheets, and they created yet another embarrassing SASS project. They only bothered to change some styles, and that was all

Oh, I know it was originally a community effort, but now it is a Canonical project, or at least a project they use

0. Point?

Canonical had not a reason to create a theme for “branding” purposes, Canonical didn’t care to work upstream, and Canonical didn’t even create a better theme. Yaru GTK is the same mess as Adwaita, with a different look, that additionally damages GNOME, and in line damages Ubuntu itself, since they use GNOME

Long story short, absolutely zero point

The Re-L Theme

As a happy Weeboo my self, I started developing a GTK theme too, based on Re-L character colors from Ergo Proxy

That isn’t the latest version, but you get the idea anyway!

My motivation however wasn’t to create a “cool theme”, but to create a proper CSS project, with SASS best practices, modularity and styles validation. And this theme was written completely from scratch with those principles from the ground up

At some point I joined #GTK to ask some questions regarding theme-apps compatibility. The problem was how I could override inApp styles (CSS that is inside apps, and might break theme), and the solution I proposed was for all GNOME/GTK apps to provide a top-class with their reversed domain name

example.org.gnome.Builder{}

GTK has a functionality that can “understand” if it should load specific styles from the GTK theme, instead of the inApp styles. We don’t really need that for every app but just for some, and I was willing to push the patches for the apps it was needed

GTK devs don’t want themes

This is something that most people believe and it is quite false. On GTK IRC (somewhere in the end of 2017), I was lucky to get all GTK maintainers, Matthias, Otte, Ebassi, Timm. I can ensure you that Otte and Timm were even came with ideas how we could override app-CSS (like on Flatpak), while Matthias and Ebassi explained me the problems with theming, specially when all this would scale in many apps. There wasn’t such thing as “we just dont want theming” but “we cannot support it”

Also Christian Hergert was kind enough to explain me how GTK CSS affects the performance, and Georges accepted some patches on Calendar so I could continue work on Re-L..

Continue working..

So I ignored the issues that Matthias and Ebassi presented to me and I was continue working will full excitement :p

Few days later, I finally realized “WTF I’m doing here” and that Matthias had a very good point, that no matter how cool is to have themes, in practice is totally not feasible in long scale, and even worse theming is damaging GNOME! (I will come to this later)

Something that apparently Ubuntu desktop team never realized or simply they didn’t care

Why GNOME Theming is not Feasible

It is very important to understand that in practice when we define “GNOME Theming” GTK and Adwaita is one entity really

For instance if we get GTK (which is where the widgets are) and start writing a theme, when we will try it on the actual GNOME apps, everything will look alien

If we get Adwaita and start modifying stuff (as Yaru does), things will look better on apps, but we will again see “wrong” styles on apps, and app authors will be pissed watching their apps not looking as indented

Reversed Engineering

So the process of creating a theme is reversed engineering really. We write styles and then we try them in every single app, and if something is broken we try to fix it. Sometimes that isn’t even possible because it is the inApp styles that break our theme, that we cannot override, unless we submit patches upstream on the app. Imagine doing that just for 30 apps, and update every single time those apps are updating

Files 3.30 with Yaru. Example of App that was updated, the styles broke and Yaru should update specifically for it. Multiply that for 50 apps

App authors from their side only need to test their apps against Adwaita, and if need or want to, they will also include some custom inApp CSS

Notice that inApp styles are typically some plain CSS files. That means apps can’t create mix-ins on the fly based on global theme properties. Perhaps that could be possible, but also CPU expensive

There is something like a color API that basically exports some color variables that developers can use on their apps, but this is very limited, and it is mostly made for working with Adwaita, rather 3rd party themes

A GNOME Theme API

Let me ask you. Do you guys know anyone else, like Android, iOS, Windows supporting third party global themes? Or if you have 10 web-apps made with Bootstrap, if you change the Boostrap CSS, won’t you need to change the inApp CSS?

Qt on KDE can do that on some degree, but good luck with QtQuick apps. And in any case GTK is not Qt

The huge issue on GTK (3 and 4) for creating some sort of a theme API is that Adwaita theme should become way more robust. But if we try to “minimize” Adwaita will end up to break all current GNOME apps

The problem with Adwaita is that does lots of work, work that apps should do instead. Imagine we can develop a full GNOME app without writing app styles at all!

Adwaita doesn’t just paint the main controls (eg buttons) or the background and text color, but it also bothers with widgets compositing, like styles in parent->child->child relationships, and much much more

And even if we were making Adwaita more robust, that wouldn’t be enough. GTK widgets composition should also become more robust. And even that would break again, when GTK will get an easy to use scene graph (custom graphics)

How Ubuntu Damages GNOME

Lets suppose that Canonical pays 5 guys (sure!) to develop their theme, test it and make sure it works perfectly in all possible apps. Which there are not many yet, but lets be positive that we will get thousands of new GNOME apps in the future (never say never!)

The major super issue is when app authors have to deal with different themes, they will avoid to create custom styles, because those will break depending the global theme, and thus they cannot create really beautiful apps. And this is why we get one color, all the same apps!

A very simple example. Adwaita Dark is dark grey, when Yaru Dark is dark brown. An app author wants to use a unique button color. But if he doesn’t know the actual background color, he obviously cannot pick a custom color that fits

Or to make it simpler, if Adwaita had a documented color palette, then Yaru color template would be totally different. Which means again an App author wouldn’t know what colors to use. And not to mention all the rest elements like borders

How my App looks?

I guess that it is important for the app authors to know exactly how their apps will eventually look like, and this is why Ubuntu made yet another terrible mistake by introducing Yaru, instead of using Adwaita

Furthermore, imagine if an app author will develop in Ubuntu, and his app looks broken on Adwaita? Not to mention the bugs people open on app regarding broken visuals, just because of a theme. And I can tell you, that app authors hate hate hate these kind of bug reports! oh, and I have open plenty of them, till I stopped using anything than Adwaita!

Ending..

All big Linux vendors that ship GNOME (GNOME, Canonical, System76 and rest), should work together on GNOME visuals and come with something really great, that everyone will be happy to use, and it will give the freedom to app authors to add lots of custom inApp styles and create really cool apps, and why not include themes per app, as Windows or professional apps do

GTK is really really powerful on theming and there is hell a lot GNOME apps can do, but unfortunately the GNOME HIG lacks documented specifications and versioning

And as long as we have 550 themes, I can tell you already they will all and forever suck, and I believe Adwaita is the best of all, simply because is where GNOME app developers test their apps! So they make totally sure everything works perfect there!

As a user I’m just sad with Canonical practices because I get a lower quality desktop to work, but if I was a GNOME developer I would be totally pissed watching Canonical destroying my work

And we have reached to the point that we thank them, because at least with Ubuntu 18.04, they use a more upstream and updated GNOME, and they don’t completely screw it as in the last past 7 years (!?) with Unity 7 and their GNOME patches

So I guess, thank you Ubuntu for doing less damage than before :p

--

--