Issues with Kvantum correctly applying themes to QT applications

@gqanubis @jldark With qgnomeplatform 0.7.1-1 installed, what’s the output of the following? Replace qbittorrent with another Qt app if applicable:

QT_LOGGING_RULES="qt.qpa.qgnomeplatform=true" qbittorrent
1 Like
QT_LOGGING_RULES="qt.qpa.qgnomeplatform=true" cantata                                              17:05:17
qt.qpa.qgnomeplatform: Font name:  "Noto Sans"  (size  11 )
qt.qpa.qgnomeplatform: Monospace font name:  "Noto Sans Mono Medium"  (size  11 )
qt.qpa.qgnomeplatform: TitleBar font name:  "Noto Sans"  (size  11 )
qt.qpa.qgnomeplatform: Cursor blink time:  1200
qt.qpa.qgnomeplatform: Double click time:  400
qt.qpa.qgnomeplatform: Long press time:  500
qt.qpa.qgnomeplatform: Double click distance:  5
qt.qpa.qgnomeplatform: Dnd drag threshold:  8
qt.qpa.qgnomeplatform: Password hint timeout:  0
qt.qpa.qgnomeplatform: Icon theme:  "Papirus-Dark"
qt.qpa.qgnomeplatform: Theme name:  "kvantum"
qt.qpa.qgnomeplatform: Dark version:  no

So, where can I set Dark version to true ?

It’s not detecting your Kvantum theme, what theme did you choose in Kvantum Manager?

It detects whether the Kvantum theme is a dark version or not. Example:

qt.qpa.qgnomeplatform: Theme name:  "Adwaita-maia-dark"
qt.qpa.qgnomeplatform: Dark version:  yes

Whatever the theme I use, it always returns “kvantum” (that was not the case with the previous version of qgnomeplatform), despite it’s correctly set in kvantum config :

cat kvantum.kvconfig:

[General]
theme=KvAdaptaMaiaBlack

I got the same issue. I had to downgrade qgnomeplatform from 0.7.1-1 to 0.7.0-1 to solve.

Oops, missed a post when I moved them to this topic, so one is out of order.

What GTK / GNOME Shell theme are you using?

What’s the output of:

cat /etc/environment

And if it exists:

cat ~/.profile

When pasting terminal output, highlight it and use the Preformatted text </> button.

Alternatively, add three backticks ` above and below the text:

```
text
```

/etc/environment :
#
# This file is parsed by pam_env module
#
# Syntax: simple “KEY=VAL” pairs on separate lines
#
CALIBRE_USE_DARK_PALETTE=1
QT_QPA_PLATFORMTHEME=“gnome”
QT_STYLE_OVERRIDE=“kvantum”
QT_AUTO_SCREEN_SCALE_FACTOR=1

Note :
Trying to override style I got this error :
Available styles: Adwaita-Dark, Adwaita, kvantum-dark, kvantum, Windows, Fusion
I set QT_STYLE_OVERRIDE to kvantum-dark and now evrything is fine … at least with dark theme

qt.qpa.qgnomeplatform: Icon theme: “Papirus-Dark”
qt.qpa.qgnomeplatform: Theme name: “kvantum-dark”
qt.qpa.qgnomeplatform: Dark version: yes

So it seems that the real Kvantum theme is not fully taken into account as it was the case in the previous version where I got the real theme name and not “kvantum-dark”

My output is:

/etc/environment                                           
#
# 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

.profile                                                    
export EDITOR=/usr/bin/nano
export QT_QPA_PLATFORMTHEME="gnome"
export QT_AUTO_SCREEN_SCALE_FACTOR=0
export GTK2_RC_FILES="$HOME/.gtkrc-2.0"
export QT_STYLE_OVERRIDE="kvantum"

Interestingly, if I install the qt5ct package, then Kvantum themes start correctly applying.

Edit: I can also confirm that downgrading qgnomeplatform from 0.7.1-1 to 0.7.0-1 resolves the issue for me, without the need to have qt5ct installed.

What GTK theme are you guys using? Can you reproduce it with Adwaita-dark or Adwaita-maia-dark?

QGnomePlatform checks if the theme name has “-dark” in the name.

1 Like

I tested with gtk theme Adwaita-blue-dark

With the last qgnomeplatform I get :
qt.qpa.qgnomeplatform: Icon theme: “Papirus-Dark”
qt.qpa.qgnomeplatform: Theme name: “kvantum-dark” (QT_STYLE_OVERRIDE)

With the previous qgnomeplatform :
qt.qpa.qgnomeplatform: Icon theme: “Papirus-Dark”
qt.qpa.qgnomeplatform: Theme name: “Adwaita-blue-dark” (gtk theme used)

So qgnomeplatform in its last version doesn’t check the real gtk theme name but seems to fallback to the value of QT_STYLE_OVERRIDE that’s why dark theme are "OK " when I set it to kvantum-dark

1 Like

Hmm… it seems to be due to this commit:

Ok I had a look at the code
If I unset QT_STYLE_OVERRIDE gtk theme is used :
qt.qpa.qgnomeplatform: Icon theme: “Papirus-Dark”
qt.qpa.qgnomeplatform: Theme name: “WhiteSur-dark-solid”

But the look isn’t exactly the same, better when I set QT_STYLE_OVERRIDE to kvantum-dark to my taste …

Hey!

I’m new to Manjaro, how would I go about downgrading the package? I’ve looked online and I can’t find a .tar.gz file that works and the file isn’t in my pacman cache.

Thanks if anyone can help :slight_smile:

Hello @ethan_the_ethan welcome.

sudo pacman -S downgrade to install “downgrade” after that you can use that to downgrade certain packages.

Usage: downgrade [option...] <pkg> [pkg...] [-- pacman_option...]

It will give you a list with possible candidates that are either local (cache) or remote on a mirror which you can downgrade to.

Hey @Th3Z0ne, thanks for responding!

Running sudo downgrade qgnomeplatform gave me a message about setting an environment variable, which I did, and then just prompted to redownload the original version. I had a look on the Arch Linux Repo Archives and I couldn’t find the old version of qgnomeplatform.

I managed to solve it another way following what was said in this forum post from last year (I had a link here but I can’t include links in my replies apparently) by adding the flag QT_QPA_PLATFORMTHEME=qt5ct to ~/.profile.

Thanks for the help anyway and responding so quickly :slight_smile:

Well, I couldn’t get my setup to play nicely with the latest qgnomeplatform package, despite @ethan_the_ethan helpful suggestions, so I just uninstalled it. The QT apps appear to be taking the kvantum themes well enough without it, so hopefully I am not missing anything by not having it installed.

I’m having the same problem after updating manjaro stable…
How can this be solved!!?? I’m having much trouble reading in QT applications

1 Like

Same issue here text is barely readable for me

I have just noticed that I am having the same problem. I use very few Qt programs, but when I loaded Calibre, the main interface was virtually unreadable.

I don’t know about Manjaro, but in Ubuntu I added QT_QPA_PLATFORMTHEME=qt5ct to my ~/.pam_environment and it works like a charm.