Rafostar / clapper

Level up your video experience with a modern and user-friendly media player.
https://rafostar.github.io/clapper/
GNU General Public License v3.0
711 stars 34 forks source link

Clapper Flatpak / theming in Ubuntu 24.04 #445

Closed Coeur-Noir closed 1 month ago

Coeur-Noir commented 1 month ago

Hi,

not a show-stopper, just a matter of taste and visual consistency.

Using Clapper installed through Flatpak on Ubuntu 24.04 ( since the .deb version in their repository is older. )

Also installed all Yaru themes through Flatpak.

I expected therefore to see Clapper themed accordingly ( ie. orange for accentuation color instead of blue ). Nope. Still blue.

Is there a way to achieve a Yaru theming on Clapper ? The ( older ) .deb package is Yaru themed though ( but has too many issues. )

Rafostar commented 1 month ago

Flatpak Yaru theme is only for GTK3 apps AFAIK. Probably best hack to get this working with GTK4 is:

Copy themes from /usr/share/themes to .themes folder in your Home directory. If it does not not exist, create it. Then apply permissions:

sudo flatpak override --filesystem=$HOME/.themes com.github.rafostar.Clapper
sudo flatpak override --env=GTK_THEME=Yaru-dark com.github.rafostar.Clapper
Coeur-Noir commented 1 month ago

Oh thanks !

Here is what I've tried, with FlatSeal : Flatseal_Clapper

and the quite interesting result : Clapper_file-chooser

and then I went back to « normal » : Clapper_initial_situation

What bugs me a little is the file-chooser which is correctly themed with both settings.

Anyway it's not a functional issue and maybe not really a bug of yours. Maybe related to ( fresh ) Ubuntu 24.04, Yaru-theme or some FlatPak subtleties ( …my first steps with FlatPak also. )

Rafostar commented 1 month ago

What bugs me a little is the file-chooser which is correctly themed with both settings.

Clapper uses your native system file chooser via portal, so it's not surprising.

Coeur-Noir commented 1 month ago

Yes, it's the native one but it's also GTK4 and correctly themed.

So there might be a way... -- Envoyé depuis Motorola g84 via le courrieleur libre K-9 Mail ( prochainement Thunderbird ).

Le 3 mai 2024 08:30:56 GMT+02:00, "Rafał Dzięgiel" @.***> a écrit :

Clapper uses your native system file chooser via portal, so it's not surprising.

-- Reply to this email directly or view it on GitHub: https://github.com/Rafostar/clapper/issues/445#issuecomment-2092385985 You are receiving this because you authored the thread.

Message ID: @.***>

Rafostar commented 1 month ago

If Yaru tries to theme a libadwaita app, then this will not be supported (cause libadwaita does not support theming). The only thing theme should be doing for an app is to apply custom accent colors.

First, check if you have $HOME/.config/gtk-4.0/gtk.css with predefined theme colors. If you do not, then:

mkdir -p $HOME/.config/gtk-4.0
echo -e '@define-color accent_color #E95420;\n@define-color accent_bg_color #E95420;' > $HOME/.config/gtk-4.0/gtk.css

Finally add permission for Clapper to read that directory:

sudo flatpak override --filesystem=xdg-config/gtk-4.0:ro com.github.rafostar.Clapper

Result:

image

Rafostar commented 1 month ago

There does not seem to be an issue with Clapper here as it correctly uses custom accent colors and I showed you how they can be applied (and work) manually to Flatpak package, so closing.