GTK4 Flatpaks don't use adw-gtk3
julianfairfax opened this issue · 15 comments
Prerequisites
- I performed a cursory search of the issue tracker to avoid opening a duplicate issue.
Checklist to make sure the issue is not on your end
- I have made sure that I do not have multiple versions of the theme installed. Only one version should be installed in either
~/.local/share/themes
or/usr/share/themes
or~/.themes
- The file
~/.config/gtk-3.0/gtk.css
does not exist. (If it does, backup and remove it.) - I have logged out and in again.
- Dark theme only. I have enabled adw-gtk3-dark in
gnome-tweaks
AND set the appearance to dark ingnome-control-center
- The flatpak theme is installed
org.gtk.Gtk3theme.adw-gtk3
andorg.gtk.Gtk3theme.adw-gtk3-dark
- The app I'm having an issue with is an actual GTK3 app and is not coded using another toolkit like GTK2, GTK4, QT, etc.
- I have created a new user profile without any modifications except adw-gtk3.
Description
Note that the GTK-4 theme is NOT supported in adw-gtk3's issue tracker.
I know, but, it is my understanding that this should work? I don't know what's going on. I have the Flatpak theme installed.
OS and version [e.g Fedora 37]
Debian Trixie
Adw-gtk3 version. Also specify your installation source. [e.g tar.xz, AUR, git main branch]
4.8
GNOME version
44.2
Application name and version (If the issue is with an app.)
No response
Any specific apps?
Any specific apps?
Transmission, for example.
Looking at /var/lib/flatpak/runtime/org.gtk.Gtk3theme.adw-gtk3/x86_64/3.22/active/files
I'm unable to find the GTK4 theme anywhere.
@dusansimic Is this something that can be fixed?
Note that the GTK4 theme also import CSS files from a different directory.
adw-gtk3/gtk/src/adw-gtk3/gtk-4.0/gtk.css
Line 38 in edb1107
Is this something that can be fixed?
Yes. I haven't realized that GTK4 support has been added. I'll modify the flatpak manifest so it includes the GTK4 theme.
@julianfairfax could you try out patched versions of flatpak packages? You can download them using the following commands.
$ flatpak install --user https://dl.flathub.org/build-repo/34773/org.gtk.Gtk3theme.adw-gtk3.flatpakref
$ flatpak install --user https://dl.flathub.org/build-repo/34772/org.gtk.Gtk3theme.adw-gtk3-dark.flatpakref
@julianfairfax could you try out patched versions of flatpak packages? You can download them using the following commands.
$ flatpak install --user https://dl.flathub.org/build-repo/34773/org.gtk.Gtk3theme.adw-gtk3.flatpakref $ flatpak install --user https://dl.flathub.org/build-repo/34772/org.gtk.Gtk3theme.adw-gtk3-dark.flatpakref
I can do that earliest on Wednesday, so maybe best to have someone else test before then?
This did not work on my end. Transmission from flathub is still not using the GTK4 theme. I also couldn't find the new install location for the updated flatpaks. Usually it's in /var/lib/flatpak/runtime/
. I did uninstall the old ones before trying the new packages.
This did not work on my end. Transmission from flathub is still not using the GTK4 theme. I also couldn't find the new install location for the updated flatpaks. Usually it's in
/var/lib/flatpak/runtime/
. I did uninstall the old ones before trying the new packages.
Same for me
It's installed into the current user (that's what's the --user
option for). You can remove that option to install it globally.
org.gtk.Gtk3theme.adw-gtk3/x86_64/3.22/active/files
do still not show any files from the gtk4 theme.
The directory layout should be: org.gtk.Gtk3theme.adw-gtk3/x86_64/3.22/[long number or symlink to active]/files/gtk-3.0
and org.gtk.Gtk3theme.adw-gtk3/x86_64/3.22/[long number or symlink to active]/files/gtk-4.0
for it to work correctly. (Unless I'm looking in the wrong place.)
org.gtk.Gtk3theme.adw-gtk3/x86_64/3.22/active/files
do still not show any files from the gtk4 theme.The directory layout should be:
org.gtk.Gtk3theme.adw-gtk3/x86_64/3.22/[long number or symlink to active]/files/gtk-3.0
andorg.gtk.Gtk3theme.adw-gtk3/x86_64/3.22/[long number or symlink to active]/files/gtk-4.0
for it to work correctly. (Unless I'm looking in the wrong place.)
@dusansimic any update on this?
Okay, so I've reached out to the flatpak community through their channels and found out that gtk4 themes are not supported through flatpak packages like org.gtk.Gtk3theme
and almost definitely never will be.
What users can however do is do just what is described in the gtk4.md, override the theme directory with flatpak permissions. This would however require installing the gtk4 theme locally (for example in the .theme
directory).
Okay, so I've reached out to the flatpak community through their channels and found out that gtk4 themes are not supported through flatpak packages like
org.gtk.Gtk3theme
and almost definitely never will be.
The runtime needs to create a separate extension point for it flatpak/flatpak#4605, only Gtk3 themes have extension now
Then you can create a separate package like org.gtk.Gtk4theme.THEME
and almost definitely never will be.
I think it will be supported, just the work needs to be done. Pop, Yaru etc. are also interested in this.
Edit. Follow https://gitlab.gnome.org/GNOME/gnome-build-meta/-/issues/697, https://gitlab.com/freedesktop-sdk/freedesktop-sdk/-/issues/1620
FDO has been pushing back against us on this. I haven't even asked on GNOME's gitlab yet because I do not believe they will be sympathetic to the cause of theming. However, if FDO continues to refuse to integrate GTK4 until it meets whatever criteria GTK3 met to justify its inclusion, GNOME may be the only folks who can do it.
I brought up a question on FDO's tracker: the existence of GTK3 theme extension points was mainly only necessary because every GTK3 version kept breaking the way themes worked until around 3.18 or 3.20. Icon themes are actually just passed directly into the sandbox, exposed as /run/host/{share,user-share}/icons
, because they're only images and it's safe.
So I want to ask: what's version churn like on GTK4 theme compatibility? Because it's possible that it may be better to take the same approach as is currently taken with icons and just pass them into the sandbox as-is. Do minor-versioned theme directories (gtk-3.18, gtk-3.20, gtk-3.22, etc) still exist in GTK4 in case they decide to go and break everything again?
I have been researching about this issue recently, and to my surprise it works, on Fedora Silverblue system, when I put adw-gtk3 theme folders in /var/home/(myusername)/.themes, in other locations it just doesn't work, for me at least. I hope this info is helpful in some way.