Default to gtk3 platform theme on GTK bases desktops
Issue that this mr fixes
Snaps using this launcher such as Okular show a KDE open file dialog on GTK based desktops. This open file dialog is really hard to navigate because the home and data directories do not point to those of the actual user.
What this MR does
To fix this, the MR defaults to using the gtk3
platform theme on GTK based desktops. This also enables the file chooser portal on those desktops, providing a completely native file chooser which has the correct user directories.
The kde-frameworks-* platform snaps currently do not ship the gtk3
platform theme or QGnomePlatform
. This is not an issue, however, because Qt will fallback to QGnomeTheme
, which is a builtin theme and is always available.
Note:
QGnomeTheme
will use Xorg and XWayland to get theme info, so there are no additional connections required for snaps using it.
Follow-up MRs
I'm still trying to figure out what the best way is to provide the gtk3
platform themes to the snaps. Either I add them to the KDE-frameworks platform snaps, or I create a separate snap which is only installed on GTK3-based desktops.
Even without that, however, this MR is still very useful because the builtin QGnomeTheme
already looks a lot more native on GTK-based desktops, the use of desktop portals further increase the native look and snaps which ship one of the gtk3
themes gain the full benefits of it.