FyshOS / fynedesk

A full desktop environment for Linux/Unix using Fyne
https://fyne.io/fynedesk/
Other
1.02k stars 47 forks source link

Set global dark theme preference when switching theme #231

Open Jacalz opened 1 year ago

Jacalz commented 1 year ago

Is your feature request related to a problem? Please describe:

It is now common place in Gnome (and possibly KDE Plasma as well) to set a global DBus value depending on dark/light theme preference. Fyne v2.3.0 will start watching this setting (https://github.com/fyne-io/fyne/issues/2657) but we do not currently set it in Fynedesk.

It believe it would be good if we could set it here to make sure that non Fyne apps (if the user has GTK+4+libadwaita apps or anything else that supports it) follow the preference.

Is it possible to construct a solution with the existing API?

I think so but it might be that we are using the fyne_settings application. In that case, it probably only makes sense to set the DBus preference when running inside Fynedesk. It should be up to the desktop environment to set it in my opinion.

Describe the solution you'd like to see:

Switching between light and dark mode sets the DBus setting that makes sure that all applications that support it automatically follow light and dark preferences.

andydotxyz commented 1 year ago

Excellent idea, let's make sure we get this into the next release (after Fyne v2.3.0)