lassekongo83 / adw-gtk3

The theme from libadwaita ported to GTK-3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GTK4 Flatpaks don't use adw-gtk3

julianfairfax opened this issue · comments

commented

Prerequisites

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 in gnome-control-center
  • The flatpak theme is installed org.gtk.Gtk3theme.adw-gtk3 and org.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?

commented

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.

@import '../gtk-3.0/libadwaita.css';

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
commented

@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.

commented

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.)

commented

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.)

@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).

commented

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

https://gitlab.com/freedesktop-sdk/freedesktop-sdk/-/blob/27825ba8d7720efe30d9f88650edcb88fd8a1c1e/elements/flatpak-images/platform.bst#L78

https://gitlab.gnome.org/GNOME/gnome-build-meta/-/blob/89623727ce7add26697e33ee0bc9ece077affa1f/elements/flatpak/platform.bst#L75

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