I’m going to bed now. I hope I can work some more on it tomorrow, but I finally figured out why the kde-frameworks
snaps also seem to include a (slightly worse) GTK3 platform theme. I found 4 themes in total being used by different snaps:
-
gtk3: Default theme for Qt apps on Linux, integrates with the current GTK 3 theme, uses the correct icon set. Part of upstream Qt but as an optional plugin. Requires the GTK 3 libraries.
-
QGnomeTheme: Fallback default theme for Qt apps on Linux in case the “gtk3” platform theme plugin is not found, use of Adwaita icon set is hardcoded in the theme. Works without gtk3 libraries.
-
QGnomePlatform: Newer GTK 3 theme created by Fedora devs. Supports deeper integration than the “gtk3” theme. Requires the GTK 3 libraries.
-
KDEPlatformTheme: KDE theme created by KDE devs. Default theme for snaps using
kde-neon
extension because thedesktop-helpers
fallback to this theme whenQT_QPA_PLATFORMTHEME
is unset.
Only 2. and 4. are included in the kde-frameworks
content snaps.
- When
QT_QPA_PLATFORMTHEME
is unset,desktop-helpers
will fallback tokde
(KDEPlatformTheme). - When
QT_QPA_PLATFORMTHEME
is set to an invalid version, Qt will fallback to “QGnomeTheme” because “gtk3” is not included in thekde-frameworks
content snaps.
So during your testing, if you suddenly see the application is using the Adwaita icons instead of the Suru/Yaru icons on default Ubuntu, it means Qt falled back to QGnomeTheme. This is what is happening in the Krita snap currently.
I think for the extension, we should build QGnomePlatform
, include it in the snap, and configure desktop-helpers
to use QGnomePlatform
when running on a GTK based desktop. Ideally, the kde-frameworks
content snap will include the QGnomePlatform
plugin in the future.