https://bugs.kde.org/show_bug.cgi?id=450175

            Bug ID: 450175
           Summary: GTK_USE_PORTAL=1 messes up the look of many GTK apps
                    in Wayland
           Product: xdg-desktop-portal-kde
           Version: 5.24.0
          Platform: Manjaro
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: plasma-b...@kde.org
          Reporter: michal.dybc...@gmail.com
                CC: aleix...@kde.org, jgrul...@redhat.com, n...@kde.org
  Target Milestone: ---

Created attachment 146682
  --> https://bugs.kde.org/attachment.cgi?id=146682&action=edit
GTK look on wayland with GTK_USE_PORTAL=1

SUMMARY
In order to have a KDE file chooser in Firefox and other GTK apps, we need to
add GTK_USE_PORTAL=1 variable to our environmental variable (user or
system-wide), or in /etc/profile.d/mozilla-common.sh
However, this setting somehow makes many GTK apps looks ugly: some themeless
look with bad font rendering, see the attached screenshot.

Re-enabling GTK look in KDE settings didn't help. Gsettings had also correct
theme parameters and yet it was all ignored. With a help of friends on Manjaro
forum, we found out that GTK_USE_PORTAL=1 is at fault here. The problem is,
when I disable GTK_USE_PORTAL, I need to add it to launcher commands of every
GTK app instead. This is impractical and can be overwritten during app update.

Also, why GTK_USE_PORTAL, which is for file chooser, influence GTK settings in
Wayland? This has to be some bug that is fixable. This issue was present for
many, many months now, so on Plasma 5.23 and now on 5.24.

STEPS TO REPRODUCE
1.  Create /etc/profile.d/mozilla-common.sh

export MOZ_PLUGIN_PATH="/usr/lib/mozilla/plugins"
export GTK_USE_PORTAL=1


This will make Firefox to use KDE file chooser, and I believe it also works for
Gimp and other GTK apps.

2. Start Wayland Plasma session
3. Start GTK app like pamac or simply run a preview of a GTK theme in app GTK
settings (this will also show a strage, ugly look).

OBSERVED RESULT

Instead, a set GTK theme, we see dark or light adwaita or themless look with
pixelartig font rendering - see the attached screenshot.


EXPECTED RESULT

GTK apps should look as set in GTK apps settings, and GTK_USE_PORTAL=1 should
not influence it at all.

Operating System: Manjaro Linux
KDE Plasma Version: 5.24.0
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.2
Kernel Version: 5.16.8-1-MANJARO (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-6700HQ CPU @ 2.60GHz
Memory: 7.6 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 530

By the way, this GTK_USE_PORTAL=1 should be in Plasma settings, not as an
obscure text config in various places. Simply add "Use KDE file chooser for GTK
applications" to GTK apps settings, but first fix the issue with Wayland. GTK
look.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to