GTK4 and inconsistent themeing question

Hello,

First off I’m fairly new to kde, having just installed it last week.
I’m using the latest (got the iso from the main site, installed, then updated everything via discover), and used the wiki guide to get plasma working with Wayland on Nvidia

I should also note that just today I reinstalled KDE, wiping my root, but my home was kept (I mounted a different partition to home), just in case that’s a factor

I’m also somewhat familiar with Linux but my last experience with it was over a decade ago, so bear with me.

I haven’t installed a lot of apps yet because I’m just toying around until a bigger SSD arrives, to help me understand modern Linux and work out kinks ahead of committing to it for a daily driver.

I installed catppuccin and the first thing I noticed is Firefox doesn’t use the theme (it’s using dark breeze instead), but all of the other default k apps do. Unsure if this is a Firefox specific issue or something.

I also noticed discord applies the window decorations, but the window theme itself does not match system theme (it’s using the default discord theme). I assume this is some proprietary bs on discords side, given they restrict cosmetics (such as window themes) through nitro.

I then noticed there’s an app in discover called gtk4cord, which I gave a try. It neither confirms to system theme, but after some reading on what exactly gtk is and what version kde comes with (gtk3) this is likely because - and it’s in the name (duh) gtk4cord is for GTK4.

There is an older version of gtkcord for 3 but it’s no longer maintained. Haven’t tried it yet.

This brings me to my next question which is, can I update to GTK4? Would that break anything with plasma apps, or should everything using 3 be forward compatible with 4?

And how exactly might I update to 4 if it’s safe to do so?

Thanks!

GTK is a toolkit/library for writing graphical applications. Plasma and KDE apps don’t use it, they use a different UI toolkit called Qt.

Some applications use GTK for their UI though. Firefox uses GTK3, gtk4cord uses GTK4. Which version to use is up to the developers of those applications and it’s perfectly normal to have a mix of GTK3 and GTK4 applications on a system.

There is point where KDE/Plasma and GTK interact. Plasma ships with a theme for GTK (named Breeze GTK) and applies some settings to GTK applications. Since the way appearance/theming is done differs quite significantly between GTK3 and GTK4, and as a result GTK4 apps mostly get their default appearance without theming.

1 Like

GTK is [stuff] that developers can use to create the graphic interface of their software, the latest version is version 4 which is still kinda newish, so chances are that you will find more than enough software programmed with version 3.

Some developers maintain two versions of their apps, one compiled against version 3 and one compiled against version 4. The problem is that GTK doesn’t feature a proper theming API (like KDE does), so most theming done to GTK programs is bandaided around esoteric style sheets.

There is another popular alternative to GTK, it is called QT, and that’s what KDE uses. KDE developers put a lot of effort to homogenize the look and feel of the KDE ecosystem, even tweaking around GTK to make it look the same as your other apps, with variable degree of success, depending on how the GTK program was made.

With GTK4, however, something called libadwaita was introduced into GTK, it was intended for giving developers full control of the look of their software at all times, making it extra troublesome for anyone else to theme the apps. So if you get a GTK4 app, you won’t be able to theme it, it may be able to detect if you are using a dark or bright theme, and use the built in one (if the app has it) at most.

So it doesn’t matter if you install GTK version 2, 3 or 4, your application will ask you for and use only the version it needs. And yes, Firefox is affected by the same problem.

1 Like

As far as themes go, the Brave browser does give you the choice to use QT and it looks very good on Plasma. So, there are apps that allow you to choose and they work with both.

For me, the biggest perk of QT and the worst failure of GTK is the file picker. I love the QT file picker and absolutely despise the GTK file picker. So, I tend to stick to apps that use QT. Still, there are a few apps where I have no choice, like GRSYNC and I wish there was a QT version available. If I were a coder, I would make this my pet project.

Thank you all 3 for the replies - I have a better understanding of what gtk is now and how gtk apps fit into kde and how various applications appear.

The overall gist here is ‘it’s up to the developer of the app’ if it conforms to styling, is what I’m understanding at a surface level, and on a deeper level, to find solutions per-app when one doesn’t conform.

With this understanding, I went to check the catppuccin’s github once more and yep, they seem to have themes and specific instructions for several common applications so it’s up to me to install them for any application that doesn’t use the system theme.

2 Likes

It appears that maybe KDE Neon is the wrong OS for you. Neon is a “pure” 64bit KDE project that is really more for people like me who want the absolute minimum of Gnome on their systems. If the majority of apps you use are GTK, then consider Ubuntu. If you want a more integrated mix of Gnome and KDE, maybe check out Kubuntu.

That being said, Neon, when used as a pure KDE environment, and following recs, is the single most stable, powerful, and fastest OS I have ever used for media creation. It blows my mind on a regular basis, and I have been using Linux for 30 years (and KDE for almost 25). My only complaint with it is that it changes faster than I can keep up with at times, but the changes have always been for the better, even if they leave me baffled for a while.

This does not make sense at all. Kubuntu is not more (or less) suitable for running GTK apps.

Use the applications you like, on the distro you like

2 Likes

I have no qualms with it so far. This was more of a curiosity, and I worded my original question in a way to help me learn how Linux and KDE are built, especially how things are rendered.

As far as my goals for usage, I’m looking for something that lets me do art and play a few games (xiv, Minecraft, maybe a few older or indie games)
Basically trying to de-windows

I did manage to tweak my theme even further to my liking, and now learning how different components of the UI are handled thru KDE (decorations vs desktop effects vs plasma themes and so on)

Only thing I haven’t really figured out is how to get the panels to have a drop shadow like window decorations do, or to add extra control to catppuccin’s window decs (I know breeze has control over it but catppuccin’s doesn’t)