cboxdoerfer / fsearch

A fast file search utility for Unix-like systems based on GTK3
GNU General Public License v2.0
3.27k stars 207 forks source link

Ability to follow system theme (automatic dark / light theme styles switching) #446

Open nekohayo opened 1 year ago

nekohayo commented 1 year ago

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.

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" lets your app switch between the two styles in realtime with a clear standardized signal, and if also lets it confidently ship its own harmonized colors/stylesheet for both light/dark scenarios if needed.

Text-heavy apps can let the user decide if they want the app to remain light (or dark) at all times or if they want it to follow/inherit the light vs dark status from the OS. Simple apps that don't have fancy stylesheets (unlike source code text editors) can simply offer the choice between: "Follow system's preference", "Always light", or "Always dark".

An example of a commonly used UI for this in GTK and GNOME apps is the screenshot you can see here: https://github.com/mjakeman/extension-manager/issues/218

Or, if you want to simplify your codebase by reducing settings, you may choose to have the app only follow the system dark/light preference at all times.