Qt configuration in GNOME edition is lacking in many ways

Most problems I found when installing/using the GNOME edition were related to Qt:

  1. In HiDPI screens at 2x or more scaling factor, all Qt apps (including those that are Manjaro-specific: Calamares installer, Settings Manager, etc) look tiny and distorted. This is because Qt auto-scaling (QT_AUTO_SCREEN_SCALE_FACTOR=1) is not set in the environment. Most Qt apps work just fine out-of-the-box with auto-scaling and those few that don't require some kind of taylored manual scaling anyway (using QT_SCALE_FACTOR or similar) and, in any case, for those marginal cases, it's better a little-bigger/smaller-than-ideal app than a tiny one. Fedora, for one, is a distribution that cares about Qt integration (after all, they develop adwaita-qt theme and QGnomePlatform) and they set QT_AUTO_SCREEN_SCALE_FACTOR=1 by default. Just try installing/running Manjaro on a 4K screen and I'm rather sure you will agree that something has to be done.

  2. qt5ct configures:

    • A font that is of different family and size than the one set for GNOME.
    • Dark-theme icons that are too light to be seen (very low contrast) in the configured kvantum theme (which is light, matching the GNOME theme). This is specially manifest in the Qt file dialog: most icons are barely visible.
    • To use Qt system dialogs (the other option is GTK2) which don't neatly integrates with the rest of the system.

    Honestly, I see no point in using qt5ct to set features that diverge so much from the ones in the host environment. Besides qt5ct doesn't seem to support system (GTK3) dialogs. These days by just leaving QT_QPA_PLATFORMTHEME alone you get pretty good integration: fonts, dialogs, icons are mostly ok. You can then override style: QT_STYLE_OVERRIDE=kvantum. This way you have one less dependency and all three points above fixed without the need to coordinate GTK and Qt settings. Another option is to use QGnomePlatorm, but I see little benefit in doing that (OTOH, it's a game changer in Wayland, since it renders decorations following the GNOME theme).

  3. The provided kvantum theme suffers (as too many kvantum themes) from https://github.com/tsujan/Kvantum/issues/399. This doesn't match the GNOME theme: menubar and toolbars take the color (dark) from the headerbar or titlebar. Worse: only one toolbar is dark, which makes for a doubly inconsistent experience. Worse: icons that look good in a light background may look awful or show accessibility problems against a dark background. Fortunately, Kvantum author has shown how to fix that by a simple modification of the theme: https://github.com/tsujan/Kvantum/issues/399#issuecomment-502512707. I find it sad that the author doesn't agree with changing this upstream as IMO current behavior is problematic in most cases but, anyway, he provides a simple way out.

Note: moderator - this is not a regular issue - moved to rants

Instead of saying, "here are all the many problems with your distro", why not reformulate as a series of suggestions to improve the gnome edition? You could then post it in #manjaro-development:feature-request

Providing suggestions instead of complaints seems like it would be much more likely to get a positive response.

1 Like

Hi @dalto I don't think you're being fair at all, I took the time to document problems each one followed by very concrete and simple solutions (most of them oneliners), all of them described in neutral language, just the facts. If you can't be objective about problems and tend to take everything personally, feel free to close or remove the post.

I personally prefer this to be removed than moved to Rants, you are being aggressive by doing that, not me by wanting to help improving the experience of others by sharing mine with suggestions for improvement.

Thank you for your ideas. I've also felt that qt configuration is lacking, and this provides some good concrete suggestions. @Ste74 can you take a look at this?

I think this should be moved to feature request category, formatting is fine aas it is.

1 Like

I am not taking it personally, I was just sharing my suggestion of how you could better get your message across.

I am not the one who moved this to rants, but I understand why someone else would have.

This is a big issue. Qt file dialogs are really bad in gnome. If we can get the theming working without qt5ct, we should do it. And if we can get it to work better, that is double the reason.

One reason they are bad now is that the configured icons are for a dark theme, as I pointed out above, so changing that in qt5ct would already be an improvement.

But I personally prefer to use GNOME system dialogs (you get your bookmarks and starreds in the file dialog, etc). It doesn't seem to be possible to set this from qt5ct.

I've used qt5ct a lot in the past but lately I've come to realize that most important integration is already done by Qt itself (maybe it wasn't like that in the past). AFAICS fonts, icons, dialogs are already took care of when inside a GNOME session.

A more explicit solution is QGnomePlatfotm which I believe is better maintained than qt5ct (it's developed as part of Fedora and shipped by default with their distribution, so you can expect to get decent support for some time at least). One important thing it does is to render the decorations (headerbar and frame) using the current GTK theme in Wayland, since it's responsibility of the client and not the compositor in that case (although I believe this can be changed by setting some additional Qt environment variable). It even tries to guess a kvantum theme which name matches the current GTK theme, but anyway this could be easily set as a style override as explained above.

So, all in all, regarding this particular point (2 in my enumeration) I believe a low hanging fruit may be to simply:

  • Remove qt5ct and rely in out-of-the-box Qt integration.
  • Set kvantum as the Qt style override in the default environment.

Thank you for the feedback and suggestions.. this Is the First Time and the First really good constructive report.. unfortunally i can t test anything with Hdpi or with 4k monitor... I really appreciate this..

1 Like

And yes seem i forgot for two years (so when we have switched into kvantum) this variable

My bad but finally a good review point me on It :blush:

I don't want to bother you, but what should I do to get this moved out of Rants? I like Manjaro, I posted this in good faith, IMO all my points were constructive and actionable, nothing I've said is based on personal opinions. By re-reading what I wrote, the only observation I found that could have triggered some feelings is my comparison with Fedora in the first point: it was done because I realized that changing a global default might be a contentious point so I considered it relevant to point out that another popular distro that puts some care in Qt integration is already doing that, but that wasn't in order to imply that Manjaro GNOME was not doing any effort in integrating Qt (after all, Manjaro is shipping qt5ct, kvantum and a Qt version of its GTK theme by default!), so sorry if it came out like that. My intention was only to point out some rough edges.

Indeed my original intention was to post all this in Manjaro gitlab, but since I wasn't sure about the right project to do it, I decided to post it in the forums.

Manjaro Gnome is for most parts my son so here the OP find a real bug since ( my bad ) i forgot this environment variable for years.. i think this Is the right Place ( sure Better for bug report use gitlab and please use this way ) but for now It Is as Is :wink:

I'm testing the following on GNOME using Xorg and QBittorrent is using the expected theme. I have qgnomeplatform-git and kvantum-qt5 installed; qt5ct and adwaita-qt are not installed.



# Requires qt5ct

# Requires qgnomeplatform
# adwaita-qt theme will be used if installed, otherwise override with Kvantum

# Requires kvantum-qt5
$ QT_LOGGING_RULES="qt.qpa.qgnomeplatform=true" qbittorrent
qt.qpa.qgnomeplatform: Font name:  "Noto Sans"  (size  12 )
qt.qpa.qgnomeplatform: Monospace font name:  "Hack"  (size  12 )
qt.qpa.qgnomeplatform: TitleBar font name:  "Noto Sans"  (size  12 )
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-Maia"
qt.qpa.qgnomeplatform: Theme name:  "Adwaita-maia-dark"
qt.qpa.qgnomeplatform: Dark version:  yes

So you suggest add other think?

QT_QPA_PLATFORMTHEME=kvantum won't work as Kvantum is a style plugin, not a Qt platform theme. See my post above.

The platform may be gnome for QGnomePlatform, qt5ct for qt5ct or unset (which works quite well for the basics, as I have already said, although you may lose some of QGnomePlatform goodies).

The style override is where kvantum enters. The style itself is set in kvantum configuration.

Have you checked what happens if you don't explicitly set the style override?

QGnomePlatform already does some effort to look for an appropriate kvantum theme:

More or less the rules are:

// Look for a matching KVantum config file in the theme's folder
    // No config found in theme folder, look for a Kv<Theme> as shipped as part of Kvantum itself
    // (Kvantum ships KvAdapta, KvAmbiance, KvArc, etc.

The advantage of this is that if you change the GTK theme then Qt will follow suit.

Yes, I have. QBitttorrent does not use the Kvantum theme without the override.


This is now my /etc/environment

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




~ >>>

i have checked both xorg and wayland session in gnome with telegram and with qbittorrent.. i see the same result when pass


So is this a good solution :thinking:

So basically drop qt5ct settings and adopt qgnomeplatform

1 Like

Hi @Ste74 I would be careful with regard setting QT_QPA_PLATFORM=xcb as a default because people in Wayland might indeed want to run Qt apps using Wayland backend and not XWayland and could be unaware of this setting. Anyway, by forcing XWayland you will spare yourself of many headaches for the time being...

Some problems I know the Wayland Qt backend has:

  1. Titlebar decorations are done by the client and may be different from the ones in the host environment. I haven't tested it but a less invasive solution than simply forcing XWayland may be to setQT_WAYLAND_DISABLE_WINDOWDECORATION=1. YMMV, please let me know if it works.
  2. Fonts are rendered too thick and dark. I've reported this upstream and the Qt guys promptly fixed it but it probably hasn't been released yet.
  3. Some rough edges here and there in some applications.

Forum kindly sponsored by