Some apps use wrong theme on title bar

#
# This file is parsed by pam_env module
#
# Syntax: simple "KEY=VAL" pairs on separate lines
#

QT_AUTO_SCREEN_SCALE_FACTOR=1

QT_QPA_PLATFORMTHEME="gnome"

#QT_STYLE_OVERRIDE="kvantum"

# Force to use Xwayland backend
# QT_QPA_PLATFORM=xcb

#Not tested: this should disable window decorations
# QT_WAYLAND_DISABLE_WINDOWDECORATION=1

EDITOR=/usr/bin/nano

I had installed qt5ct, removed it and rebooted and its still not respecting theme.
qgnomeplatform is installed.

What if you use Adwaita, Adwaita-maia or Matcha?

Adwaita and Matcha works correct

Which Yaru theme specifically are you using and where did you get it from?

I tried yaru theme from AUR and yaru-orange from there GitHub - Jannomag/Yaru-Colors: A fork of Ubuntu's Yaru theme - in different colors

yaru-orange worked correct in other distributions. I dont understed why Manjaro somehow use light variant of theme theme for some apps.

Again, those apps you’re referring to are Qt apps. GTK themes only work with GTK apps. QGnomePlatform attempts, but if it can’t match the theme it should default to Adwaita. Alternatively, you can find a matching Kvantum theme.

But it use actualy yaru theme but for unkown reason light variant instead of selected dark.

Since it’s only happening with that theme, I would contact the theme developer.

Yeah, theme works correct on all distros that I tested - Ubuntu, Pop OS, Arch Linux, EndeavourOS, openSUSE, Gecko Linux, Fedora, Debian, CentOS, etc and the ONLY ONE where theme is broken is Manjaro… Come on man… Its not theme fault but distro issue…

Is it though?

On those other distros did you actually test QT applications?

Also … whats the configuration difference?
For example the env vars:

echo $QT_QPA_PLATFORMTHEME $QT_STYLE_OVERRIDE $QT_QPA_PLATFORM

Or the ‘use dark variant’ setting … which is a user desktop setting, but we will check the config file:

grep "dark" ~/.config/gtk-3.0/settings.ini

(check on one of your other distros where it ‘works better’ … but remember that only counts if true for QT applications such as VLC, qbittorrent, etc)

Yes, I’m testing VLC and I dont play with configuration, just theme change.

echo $QT_QPA_PLATFORMTHEME $QT_STYLE_OVERRIDE $QT_QPA_PLATFORM

Gives no output on Ubuntu 20.04 and openSUSE Leap 15.2

grep "dark" ~/.config/gtk-3.0/settings.ini

Gives this on both distros “gtk-application-prefer-dark-theme=0”

Mine also did this, although I knew why and didn’t “blame” others, I just didn’t know what I was missing where.

I think it was eventually sorted with the following configuration:

  • System settings > Appearance > Global theme, in the right bottom, click on Get new... and install a dark theme. (I’m using the “Arc dark” theme)
  • System settings > Appearance > Plasma theme, in the right bottom click the Get new... button and download a theme. (I’m using the “Arc dark” theme). Also, For dark themes, I recommend installing the “Oxygen” theme. (Don’t enable it, just install it)
  • System settings > Appearance > Application style (I suspect this is where the big thing is), click on the Configure GTK... button in the bottom middle of the window.
    • In the middle of the window, select the theeme you wish to use. (This is where the Oxygen download from earlier comes into play. I use Ocygen dark (or something like that)

Don’t forget to save/apply after each step.

I hope this helps.
(P.S. Don’t be rude to the people that are only try6ing to help.)

With that then I would advise commenting out all of those environment variables in your manjaro /etc/environment to compare.

@Mirdarthos Sorry, but I think you provided instructions for a KDE desktop, whereas OP is on Gnome

@cscs, you are absolutely correct, they are KDE instructions.

From the original screenshots it quickly looked like KDE to me. And from what I read here, it also looked that way.

But I see now that I saw wrong, and I humbly apologize and ask forgiveness.

Thanks for trying to help but this is for KDE. I’m on GNOME :slight_smile:

Sadly no luck again. I give up.
Thanks for trying to help anyway.

I have finally been able to solve it. The problem is that the titlebar uses the light theme customization, which is inconsistent with Yaru.

First, set the theme in Kvantum to KVYaru. Then make any change to it in the custom settings section. This should generate a config folder for KvYaru in the config folder of Kvantum(~/.config/kvantum). Undo this change.

Next, go to the config folder and open the KvYaru# folder. Open the config file inside it and add this under the [%General] section

dark_titlebar=true

This should force the dark theme on the title bar and fix the problem.

So once again … this is only about QT apps then, not GTK?
and for yaru theme specifically?
But … yaru is a GTK theme … KVyaru isnt a real theme … its an automatically generated one from kvantum. But as far as them being generated … shouldnt there be Dark options?

In any case we are back at ‘why does my gtk theme not work on qt applications when I dont choose a dark qt theme’ … which seems pretty shruggable.
If there really is no better option … then I am glad for you to have your workaround I guess.

I ran into a similar issue when I switched my desktop from Gnome to KDE and then back to Gnome. The final solution was for me

The Fix:

(1) Navigate to the ~/.config/gtk-3.0/

(2) Delete the following KDE files:

assets/

  • folder for the buttons to integrate with the Breeze theme

colors.css

  • to match the colors of the color-scheme used in KDE Plasma

window_decorations.css

  • to decorate the windows according to Breeze

(3) The following files will be kept:

gtk.css
settings.ini

(4) Reboot the system

https://forum.manjaro.org/t/how-to-restore-default-style-of-windows-buttons-in-gnome-shell/34414/3