Open TomiOhl opened 1 year ago
Note: while the updated title is true, probably it doesn't have to respect that setting, I've just provided that additional info. As the Spotify app itself is always dark, probably it should just be dark all the time, as before.
I am using Fedora 37 with Gnome 43.4. I cannot confirm this problem
@TomiOhl Oh I think the elementary theme just doesn't provide a dark variant anymore?
Not sure. I don't think it's a change on elementary's side either, I follow the PRs in their org. The last stylesheet update was three weeks ago, but that didn't affect Spotify. The first time I noticed the issue was after the updates last week. It's worth noting that there is an updated Spotify UI, too, that differs from the screenshots:
Coincidentally, there is a new glitch while opening: first, a small window appears on the top left, then it closes and the normal window opens. This might also be related, maybe the script terminates when the small window closes?
I mentioned that I'm able to open Spotify with dark title bar if I force the gtk dark theme via pantheon tweaks. It relies on gtk-application-prefer-dark-theme
, I think the related code is here.
I think you could test variants like so.
env GTK_THEME='Adwaita' gtk3-demo
env GTK_THEME='Adwaita:dark' gtk3-demo
Just replace Adwaita with the name of the Elementary theme.
Well, interesting. So the command that the .desktop file uses to run spotify is:
flatpak run --branch=stable --arch=x86_64 --command=spotify --file-forwarding com.spotify.Client
I've added the basic adwaita theme setting:
flatpak run --env=GTK_THEME='Adwaita' --branch=stable --arch=x86_64 --command=spotify --file-forwarding com.spotify.Client
Spotify opened with light title bar, but as soon as I started playing something, the title bar switched to dark.
Later I've tried with Adwaita:dark and even with one of elementary's stylesheets, the result is the same.
In fact, the same behavior could be observed regardless of the env.
Then I rebooted the laptop. Opened Spotify. It was light. Started playing music. Still light.
Then I closed and re-opened it. It was light, but switched to dark as soon as I've started playing music.
Note: later I've noticed the reason why playing music helps: as soon as I play something, a notification appears. Changes in the active windows do seem to be the cause. If I disable the notifications, I can start playing music but the title bar will stay light. However, if I open/focus another window, the title bar's color will change.
TL;DR: after system startup, opening Spotify -> closing it -> opening it again -> focusing other window is the sequence which seems to produce a dark title bar now. No idea if this really didn't work for me two days ago or I missed something.
Update: after #237 two things changed:
I just wanted to say I'm using Zorin OS with light theme (ZorinBlue) and Spotify doesn't switch to dark theme no matter which workaround I try The only way to have a dark titlebar is to switch my system to a dark theme
I don't really think there is anything we can do. The whole reason the script exists is because the titlebar isn't controlled by us so its always light by default. If your theme has a dark variant it gets used, if not its the default light.
@TingPing this problem is happening for me despite having Adwaita + Adwaita dark as system themes, and Adwaita + Adwaita Dark installed via Gnome Software too. So it is not just a "is a dark theme available" issue.
A "variant" is not "a dark theme" its a specific version of the current theme.
This script was removed in b1ff36b9bc171592d09d55b859fb38113601faa9 anyway.
Ah, that is too bad.
Are there no plans to default the Flatpak to always be dark theme (if available)?
The title bar - which used to be dark themed on this flatpak version - became light themed since the updates on 4th April. Closing and reopening doesn't help (it used to when it happened with the previous versions). I'm using elementary os 7, switching on the system-wide dark mode doesn't help (freedesktop color scheme preference), however, forcing dark mode from "Elementary tweaks" does make it dark.