ValveSoftware / SteamOS

SteamOS community tracker
1.52k stars 69 forks source link

SteamOS 3.5 : Flatpak GTK apps not using Plasma's theme #1146

Open AxelTerizaki opened 9 months ago

AxelTerizaki commented 9 months ago

Your system information

Please describe your issue in as much detail as possible:

Ever since I switched to the preview channel to install SteamOS 3.5, flatpak apps using GTK (Firefox, Newsflash, Flatseal...) ignore Plasma's settings regarding themes. The windows show a light theme instead of Plasma's dark one.

I already tried to go into KDE settings and modify GTK windows appearance, but to no avail. I also tried uninstalling and reinstalling the apps' various flatpaks as well as the GTK3 Breeze theme.

I suppose this is a bug, since it was working fine before the update for these apps.

Did anyone else run into this?

redoxeon commented 9 months ago

I think it might be GTK4 apps specifically. There's a "prefer-dark" variable that GTK4 uses that I think isn't being set. Chrome will also go light mode if you go to the appearance settings and select "Use GTK" for the theme.

AxelTerizaki commented 9 months ago

I'm not too familiar with GTK versions but I think you're right.

For Firefox I was able as a workaround to install a dark theme from Mozilla's store but for other apps I can't seem to be able to make them follow Plasma's theme.

AxelTerizaki commented 9 months ago

BTW, I worked around that using flatseal, installing Adwaita-dark theme from flatpak, and setting GTK_THEME=Adwaita-dark and ICON_THEME=Adwaita-dark environment variables for all apps. I don't get the old look it had but at least it's dark again now, and fits a bit better with the Plasma DE look.

Still, looks like an annoying bug to me :)

ebassi commented 9 months ago

GTK4/libadwaita applications should use the settings portal from KDE; Firefox uses GTK3, but it should still be using the portal API for settings. Changing the GTK3 theme is not going to solve the issue, since GTK4/libadwaita applications won't use a GTK3 theme.

Can you look in the file system for a kde-portals.conf configuration file? It should be in /usr/share/xdg-desktop-portal.

ebassi commented 9 months ago

Just to clarify: this happens in the desktop session, right?

ebassi commented 9 months ago

Final question: are you using a custom dark Plasma theme for GTK applications as well? What happens if you do not try to make GTK applications look like Plasma ones? Do GTK apps switch appearances when the dark style is set?

redoxeon commented 9 months ago

I'm not the original issue creator, but I can help add data :)

Setting Adwaita-dark variables from flatseal or overrides from the terminal help a bit by making the apps dark but look like they break some of the other styles when I've tried it.

Can you look in the file system for a kde-portals.conf configuration file? It should be in /usr/share/xdg-desktop-portal.

my usr/share/xdg-desktop-portal looks like fhis (I'm on 3.5 as well)

> ls /usr/share/xdg-desktop-portal
gamescope-portals.conf  portals/kde.portal

I'm not seeing a kde-portals.conf specifically, sadly.

Just to clarify: this happens in the desktop session, right?

yep!

Final question: are you using a custom dark Plasma theme for GTK applications as well? What happens if you do not try to make GTK applications look like Plasma ones? Do GTK apps switch appearances when the dark style is set?

I'm not. I tried picking Breeze dark in the settings and manually, but neither worked so I reverted those back to default. Default is for GTK4 apps at least to be light mode.

AxelTerizaki commented 9 months ago

I confirm everything the message above said :)

jpwhiting commented 9 months ago

It appears that kde-portals.conf got added in xdg-desktop-portals-kde in 5.27.7, but deck is on 5.27.5, so it may help once that gets an update.