wish: Automatic GTK dark theme switching (using the Freedesktop standard)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
HomeBank |
New
|
Wishlist
|
Unassigned |
Bug Description
Homebank has a "Dark theme" setting in its preferences dialog, but that's mostly obsolete nowadays, as there is a better way.
Nowadays there is a standardized way for your app to authoritatively know (without just trying to "guess" whether the current GTK theme is dark or not) what the user's intent is in terms of light/dark themes.
* Overview here: https:/
* Implementation tips here: https:/
Most applications already support this with GNOME 42+ and Elementary OS 6, even non-purely-GTK applications such as Firefox. I believe lots of applications on KDE support this standard as well.
Knowing "what the user actually _wishes_ for" at any point in time lets your app switch between the two styles in realtime with a clear standardized signal, and also lets it confidently ship its own harmonized colors/stylesheet for both light/dark scenarios if needed. In Homebank's case, this could actually let you simplify your "Amount colors" section by simply switching between your "Tango light" and "Tango dark" color schemes depending on the global light/dark state of the desktop/
---
If you want to offer extra configurability to the user (instead of just auto-following the system's state), you could offer the choice between: "Follow system's preference", "Always light", or "Always dark".
On the desktop side, an example of a commonly used UI for this in GTK and GNOME apps is the screenshot you can see here: https:/
---
That's for the Linux / Freedesktop side. Windows and macOS also have their own light/dark state APIs, but I don't know what they are.
Changed in homebank: | |
importance: | Undecided → Wishlist |
tags: | added: user-interface |
that's mostly obsolete nowadays
=> as long as the user can use system default and force dark whenever he wants = nothing is obsolete
But I agree, I have implemented this into my website (not online yet), and as I also switch night/day between light/dark theme, having app following this is a plus, not really better, but I probably miss that 4 mouse click is too much effort for some people at present.
a few comments for me later on: -prefer- dark-theme -prefer- dark-theme is not initialized on Windows 10, not 11
- freedesktop is a Linux specification
- seems only available for Gnome and Granite
- for example no /appearence set in /org/freedesktop/ in Cinnamon or Mate
- even with GTK4, it requires libadwaita
- on GTK3 for now we can only rely on gtk-application
- gtk-application
so it may be possible to implement a more accessible menu entry with force-light/ force-dark, but default seems complex to get, on Linux at first, but probably more on Windows, didn't look at Mac.
It would be so much easier if GTK3/4 directly expose a reliable cross platform prefer- dark/light/ default as well.
You seem to have connection with the developers: if you can suggest, please do :)