GTK Theming for Flatpaks in Fedora Onyx (Budgie)

Every gtk3/4 app I install via Flatpak in Fedora Onyx uses the default adwaita styling despite having my current GTK theme (materia-dark) installed as a Flatpak. On my machine running Budgie on the regular flavor of Fedora, there is no issue here. What can I do to get my apps to look consistent?

Well, GTK4+libadwaita apps can’t be themed without special effort, and plain GTK4 themes aren’t currently packaged for flatpak, but GTK3 themes should work.

Please share the output of these two commands:

flatpak override --show
flatpak override --show --user

I have no overrides and the output of both commands is empty.

Also, non-libadwaita apps like file roller don’t follow the theme either even when installed via rpm.

There’s a org.gtk.Gtk3theme.Materia-dark flatpak theme extension, which should have been installed automatically upon flatpak update. That should cover GTK3 flatpak apps.

As mentioned before, there are no GTK4 theme extensions yet, so you’d need to do something like:

flatpak override --user --filesystem=xdg-data/themes

assuming you installed the theme to ~/.local/share/themes. There are only a few plain GTK4 apps that this would apply to though.

That theme isn’t one of the ones that can be used with libadwaita apps by overriding the GTK stylesheet: libadwaita compatibility · Issue #618 · nana-4/materia-theme · GitHub


Is the theme set correctly? What does gsettings get org.gnome.desktop.interface gtk-theme say?

How is the theme installed?

The theme is set properly via gsettings and it came with the distribution. I have the Flatpak extension installed via flatpak update.

Also, file roller is not a libadwaita app and the theme works on my desktop machine running the base version of Fedora as mentioned earlier.

Please run GTK_DEBUG=interactive file-roller. In the Inspector window, go to the Visual tab. Which GTK themes are available in the dropdown?

All of the installed themes are available. However, switching them does not work.

Is this Wayland or X? Are there any .css files in ~/.config/gtk-3.0/?

Budgie only supports X11 and this is a fresh install with no defined CSS in that directory.

Oh, I think I see the problem. file-roller uses libhandy (GTK3 predecessor to libadwaita), which chops the ‘-dark’ suffix off theme names to make the global color scheme work properly. You need to ensure that the regular ‘Materia’ theme is installed, both on the system and in flatpak. Then you need to enable dark mode. If Budgie has no support for this, you can use:

gsettings set org.gnome.desktop.interface color-scheme prefer-dark