GNOME Bugzilla – Bug 783666
Remove Global Dark Theme tweak
Last modified: 2017-11-29 20:39:54 UTC
Problems with Global Dark Theme =============================== 1. Changing this setting does not affect any currently running apps. The user needs to either log out or manually close all apps for the change to take effect. In contrast, a regular theme change goes into effect immediately. 2. Some themes (like Ubuntu's Ambiance and Radiance) don't yet support a dark variant so the toggle switch does not do anything there. 3. The setting does not work with any GTK2 apps since the GTK+ feature hacked to make this work was introduced in GTK3. The Solution ============ Theme developers are encouraged to make a separate Dark theme variant. Adwaita has done this since last year. Arc has 3 different versions to allow a user to pick the dark version. Proposed Plan ============= 1. Make a blog post now announcing this change and attempt to circulate it widely. 2. Implement the change for GNOME 3.28 to give theme developers plenty of time to adapt. 3. Implement the change by dropping the Global Dark theme config when the user opens Tweak Tool 3.28 and changes the GTK+ theme. This is less disruptive than dropping the change when a user simply opens Tweak Tool. It is also less disruptive than trying to do this in the background upon upgrade to GNOME 3.28.
(In reply to Jeremy Bicha from comment #0) > Problems with Global Dark Theme > =============================== 4. Writing to `settings.ini` cannot work for sandboxed applications (Flatpak) but GtkSettings (changing the theme) can. > 2. Implement the change for GNOME 3.28 to give theme developers plenty of time to adapt. I think we should start migrating to -Dark version automatically this cycle honestly but gracefully handle a `-Dark` version not existing for maybe another cycle. Many themes support this already and it is an easy change, for example I got the Pop theme to do this recently.
(In reply to Patrick Griffis (tingping) from comment #1) > I think we should start migrating to -Dark version automatically this cycle > honestly but gracefully handle a `-Dark` version not existing for maybe > another cycle. I think you're suggesting that the Global Dark Theme switch only show up for certain themes. I'm not sure that would work very well.
I'm not certain the best UI for it but an idea is: If current theme has -Dark set prefer dark option insensitive with some description of why.
I'm kind of skeptical about your proposal. If you do work on it, I think you should also check if the theme provides a gtk-3.0/gtk-dark.css . Three themes here that do not provide that are Ambiance, Radiance, and Ark Dark (but Arc and Arc Darker do provide it).
So I'm in <3.28 with a theme Adaita and dark switch selected. After upgrade to 3.28, dark switch will not be there so how is it supposed that I will see my actual theme? I think is better to change theme+dark switch to theme-dark on combo. For themes that do not provide dark option what do dark switch do? if it does nothing after disappear there will be nothing to fix (if it does an inverse colors or similar, theme providers should provide that as dark theme) I think blog post is essential here
Alberto, after upgrading according to my proposal, the theme switcher will still say Adwaita. If you change your theme to something else the Global Dark theme option will be dropped silently in the background and you'll need to then click Adwaita Dark to get back to your previous theme, except that Adwaita Dark will work better than Adwaita with the Global Dark Theme hack enabled. That seemed like the least disruptive way I could think of to handle this transition.
(In reply to Jeremy Bicha from comment #6) > Alberto, after upgrading according to my proposal, the theme switcher will > still say Adwaita. If you change your theme to something else the Global > Dark theme option will be dropped silently in the background and you'll need > to then click Adwaita Dark to get back to your previous theme, except that > Adwaita Dark will work better than Adwaita with the Global Dark Theme hack > enabled. > > That seemed like the least disruptive way I could think of to handle this > transition. That seems like a sensible solution to me. I don't think it'd require much effort for us to package the dark variant separately so unless any of my co-maintainers have anything to add, consider this a +1 from Numix :)
@Jeremy I am all for dark variant. But I guess we would still require gtk-dark.css for light version also. Some app explicitly prefers dark-variant. Dark variant can either have a separate gtk.css or point to the same gtk-dark.css of normal variant in gtk.gresource. > 3. Implement the change by dropping the Global Dark theme config when the user opens Tweak Tool 3.28 and changes the GTK+ theme. In $XDG_CONFIG_HOME/gtk-3.0/settings.ini, gtk-application-prefer-dark-theme = true would still work. No?
(In reply to Khurshid Alam from comment #8) > @Jeremy > > I am all for dark variant. > > > But I guess we would still require gtk-dark.css for light version also. Some > app explicitly prefers dark-variant. Dark variant can either have a separate > gtk.css or point to the same gtk-dark.css of normal variant in > gtk.gresource. > It is in no way required, just a nice to have. > > 3. Implement the change by dropping the Global Dark theme config when the user opens Tweak Tool 3.28 and changes the GTK+ theme. > > > In $XDG_CONFIG_HOME/gtk-3.0/settings.ini, > > gtk-application-prefer-dark-theme = true > > would still work. No? As in the user can still do that? Yes that is a Gtk option but the entire point of this issue is that is a bad option with many downsides so g-t-t shouldn't expose it.
IMO this seems like the kind of thing that should be dropped everywhere at the same time, otherwise not having a desktop-wide setting for it might lead to some baffling scenarios: won't GTK+ then be able to select CSS files that Tweak Tool can never access? (if the theme is old or the -dark.css was not removed)
Created attachment 363548 [details] [review] appearance: remove Global Dark Theme tweak And turn it off when the Applications theme is changed.
Attachment 363548 [details] pushed as 72e5f6d - appearance: remove Global Dark Theme tweak
Daniel, the GTK+ setting still exists. It exists so that developers can opt in individual apps to a dark variant (this is particularly popular for multimedia apps like a video player). But as explained earlier in this bug and in this announcement, the Global Dark theme tweak (or "hack") is not as nice for users as a dedicated dark theme variant. https://jeremy.bicha.net/2017/08/29/gnome-tweaks-3-25-91/ The promised change is done now in the development snapshot Tweaks 3.27.2. Tweaks 3.28 will be released in March.
Could you then instead add an option for a second night-mode theme to chose? Like day- and nighthack in Builder, or the color temperature value in night light.
Frank, please open a new bug.