After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 783666 - Remove Global Dark Theme tweak
Remove Global Dark Theme tweak
Status: RESOLVED FIXED
Product: gnome-tweak-tool
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME Tweak Tool maintainer(s)
GNOME Tweak Tool maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2017-06-11 20:12 UTC by Jeremy Bicha
Modified: 2017-11-29 20:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
appearance: remove Global Dark Theme tweak (5.52 KB, patch)
2017-11-13 21:14 UTC, Jeremy Bicha
committed Details | Review

Description Jeremy Bicha 2017-06-11 20:12:04 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.
Comment 1 Patrick Griffis (tingping) 2017-06-11 20:18:56 UTC
(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.
Comment 2 Jeremy Bicha 2017-06-11 20:43:04 UTC
(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.
Comment 3 Patrick Griffis (tingping) 2017-06-11 22:36:12 UTC
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.
Comment 4 Jeremy Bicha 2017-06-11 23:51:22 UTC
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).
Comment 5 Alberto Fanjul 2017-06-14 00:11:43 UTC
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
Comment 6 Jeremy Bicha 2017-06-14 00:16:58 UTC
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.
Comment 7 Dustin Falgout 2017-06-14 01:26:46 UTC
(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 :)
Comment 8 Khurshid Alam 2017-06-14 07:24:06 UTC
@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?
Comment 9 Patrick Griffis (tingping) 2017-06-15 00:50:50 UTC
(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.
Comment 10 Daniel Boles 2017-08-23 19:30:04 UTC
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)
Comment 11 Jeremy Bicha 2017-11-13 21:14:01 UTC
Created attachment 363548 [details] [review]
appearance: remove Global Dark Theme tweak

And turn it off when the Applications theme is changed.
Comment 12 Jeremy Bicha 2017-11-13 21:14:27 UTC
Attachment 363548 [details] pushed as 72e5f6d - appearance: remove Global Dark Theme tweak
Comment 13 Jeremy Bicha 2017-11-14 00:10:11 UTC
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.
Comment 14 Frank 2017-11-29 20:26:43 UTC
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.
Comment 15 Jeremy Bicha 2017-11-29 20:39:54 UTC
Frank, please open a new bug.