GTK applications ignore KDE application style (Breeze / default) and stay in light mode

There seems to be an issue with the KDE application style settings when using GTK-based applications. No matter whether I select Breeze or Default as the application style, my Slicer program always stays in light mode.

When I try different GTK themes, the application correctly switches to dark mode. However, I don’t want to use a different GTK theme — I’d like it to follow the KDE Breeze Dark style.

It looks like the GTK theme settings from KDE are not being properly applied to this program. I assume there must be a way to fix this by changing some GTK configuration files, so the window is displayed in dark mode as expected.

Steps to reproduce:

Open KDE System Settings → Appearance → Application Style.

Set Application Style to Breeze (or Default).

Launch a GTK application (for example, my Slicer program).

Observe that it stays in light mode, even though KDE is set to dark.

Expected behavior:
GTK applications should follow the KDE Breeze Dark theme and display in dark mode.

Actual behavior:
The GTK application remains in light mode regardless of the KDE application style setting.

Additional information:

I have tested switching to other GTK themes, and dark mode works correctly there.
I prefer not to use another GTK theme; I want KDE Breeze Dark to apply properly.

See attached system information and screenshot of the affected window.
There seems to be an issue with the KDE application style settings when using GTK-based applications. No matter whether I select Breeze or Default as the application style, my Slicer program (a GTK app) always stays in light mode.

When I try different GTK themes, the application correctly switches to dark mode. However, I don’t want to use a different GTK theme — I’d like it to follow the KDE Breeze Dark style.

It looks like the GTK theme settings from KDE are not being properly applied to this program. I assume there must be a way to fix this by changing some GTK configuration files, so the window is displayed in dark mode as expected.

Steps to reproduce:

Open KDE System Settings → Appearance → Application Style.

Set Application Style to Breeze (or Default).

Launch a GTK application (for example, my Slicer program).

Observe that it stays in light mode, even though KDE is set to dark.

Expected behavior:
GTK applications should follow the KDE Breeze Dark theme and display in dark mode.

Actual behavior:
The GTK application remains in light mode regardless of the KDE application style setting.

Additional information:

I have tested switching to other GTK themes, and dark mode works correctly there.
I prefer not to use another GTK theme; I want KDE Breeze Dark to apply properly.

See attached system information and screenshot of the affected window.

No they should follow the GTK theme. QT and GTK are different GUI toolkits, the themes aren’t really compatible.

However some are made for multiple toolkits.

sudo pacman -S breeze-gtk
3 Likes

@dmt And what does this command do?

Welcome to the forum! :vulcan_salute:

As far as I know, gtk applications will only follow the Plasma color theme if — and only if — there is a matching gtk style installed, because then Plasma can tell gtk to use its matching theme.

One cannot simply change the colors in gtkapplications the way it is done in Plasma, simply because the gtk developers do not allow that. gtk is a much more restricted widget set in terms of adaptability and flexibility. If you want to change only one tiny aspect to how it looks, then this must be done by choosing a different gtk theme.

Now, by default, Plasma ships with the Breeze application style, and a matching Breeze gtk theme, but to the best of my knowledge, there is no dark variant of the Breeze gtk theme.

So the only possibility is to hunt for a dark gtk theme that more or less matches the look of the Plasma-native Breeze theme in dark mode — for qt, upon which Plasma is based, the color scheme is a separately configurable aspect of the theme, while with gtk it is an integral part of the chosen theme. :man_shrugging:

2 Likes

It installs the package breeze-gtk, which is the breeze theme ported to GTK (not sure if the dark variant is included, but it’s be a silly omission if it isn’t).

You’ll probably want kde-gtk-config too (log out and back in after install), it adds a section for GTK to the normal theme settings.

All of this is in the link I posted.

On my system it isn’t, and never was. :man_shrugging:

This should already be installed by default, normally.

1 Like

There seems to have been a misunderstanding.

I already have breeze-gtk installed, and that’s exactly what I meant. This causes the error shown in the image here. Dark mode is not recognized.

Edit:

Strangely, I can’t upload any pictures here.

Yet the package lists files relating to the dark variant.

Quite right.

As I told you, there is no dark mode. With gtk, “dark mode” means using a separate (and dark) theme.

The ability to upload images requires Trust Level 1. Newly registerd members start off at Trust Level 0. If you stick around, read some more posts and remain active, you will automatically level up to TL1 soon enough.


That is strange. I’ve never found a way to get that to work here, so I’m using a completely unrelated gtk theme.

Yes it seems it doesn’t give the option to use the dark version. It seems to be there though.

$ ls /usr/share/themes/Breeze-Dark/
assets  gtk-2.0  gtk-3.0  gtk-4.0  settings.ini

Perhaps another configuration utility, or editing some files may work. I’m relatively new to KDE, having always used GTK based DEs, so not something I’ve explored.

:man_shrugging:

1 Like

Since I can’t upload any pictures, I don’t know how to explain it.

We understand perfectly what you mean without the pictures. :grin:

1 Like

I now have a different design and the window starts in dark mode.

2 Likes

Well, there you go. :wink:

Note that there is also a difference in behavior and configuration between applications created with gtk2, gtk3 and gtk4. It is especially the latter which aims to make things difficult for its users. :man_facepalming:

gtk2 was the most interoperable version. gtk3 already introduced more difficulty. gtk4 is the worst so far.

2 Likes

I just selected a different design to see what it looks like. I don’t want to use this design, I just want to use the standard KDE design that I like. But to do that, I have to fix this error somehow.

You’re still not getting it. Repeat after me: There is no error. This is how gtk works.

1 Like

But why does it work with another GTK?

I have told you that: because it depends on the chosen theme. The Breeze gtk theme somehow doesn’t offer the ability to use its dark variant, even though my colleague says that there is one.

It also depends on which gtk version the application was built against, because the different gtk generations behave differently.

2 Likes

That is strange - it works for me, I just hadn’t noticed.

I’ve got Breeze selected for GTK, and the colour theme (“Colours”) affects all GTK apps. Both Breeze and Breath dark work, and if I switch to a light theme then the apps switch too.

Tested with Eye of Mate, GIMP and Firefox (I thought I’d just configured firefox to be dark, but I was thinking of a different setting).

Well, chromium and gimp — both using gtk3 — do obey the chosen gtk theme here, but it’s not Breeze. With Breeze it’s always light.

Of course, I’m not using the KDE-native Breeze either, but that shouldn’t make any difference.

1 Like