enabling dark theme should set ui.systemUsesDarkTheme=1 to enable dark account central etc.
Categories
(Thunderbird :: Theme, enhancement, P2)
Tracking
(thunderbird_esr68 affected)
Tracking | Status | |
---|---|---|
thunderbird_esr68 | --- | affected |
People
(Reporter: mkmelin, Assigned: aleca)
References
()
Details
Currently if you enable the Thunderbird dark theme you still get a light account central, and some other similar pages, unless the system theme is also dark.
Setting ui.systemUsesDarkTheme = 1 makes it consistent within the application.
xref bug 1559176, bug 1559174
Comment 1•5 years ago
|
||
Since bugs you referenced have been addressed, can this piece be done now?
I'm not up on all the pieces to make this possible, but we should also make it so that plaintext email shows up white-on-black.
Reporter | ||
Comment 2•5 years ago
|
||
Richard, do you have any background info there? Are there reasons to do it one way or the other?
Comment 3•5 years ago
|
||
Enabling ui.systemUsesDarkTheme would also apply to web content like the start page or ATN, when it would support it.
We could also try to add a new pref like mail.content.dark-mode
when a dark theme is used and add to the media queries a @supports -moz-bool-pref("mail.content.dark-mode")
to account central and multimesssage view.
If you want to apply the dark colours to the content (message pane, composer editor area), we maybe need to port bug 1347204.
Reporter | ||
Comment 4•5 years ago
|
||
(In reply to Richard Marti (:Paenglab) from comment #3)
Enabling ui.systemUsesDarkTheme would also apply to web content like the start page or ATN, when it would support it.
But that sounds like something we want, no?
If you want to apply the dark colours to the content (message pane, composer editor area), we maybe need to port bug 1347204.
I see https://hg.mozilla.org/mozilla-central/rev/57eb4ec50bfb from that, but if we don't want a whitelist, that doesn't appear to be very needed, I think.
Comment 5•5 years ago
|
||
(In reply to Magnus Melin [:mkmelin] from comment #4)
(In reply to Richard Marti (:Paenglab) from comment #3)
Enabling ui.systemUsesDarkTheme would also apply to web content like the start page or ATN, when it would support it.
But that sounds like something we want, no?
Yes, but this stylesheets need to be provided from the thunderbird server.
If you want to apply the dark colours to the content (message pane, composer editor area), we maybe need to port bug 1347204.
I see https://hg.mozilla.org/mozilla-central/rev/57eb4ec50bfb from that, but if we don't want a whitelist, that doesn't appear to be very needed, I think.
Then we should set ui.systemUsesDarkTheme=1
when the dark theme is set and ui.systemUsesDarkTheme=0
when the light theme is set (to override a dark system theme)? When none of this two themes are set, we clear the pref to let the default apply.
Reporter | ||
Comment 6•5 years ago
|
||
Sounds like something for Alex to bite into ;)
Comment 9•5 years ago
|
||
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 10•5 years ago
|
||
Hi Tim, sorry to bother you but I need a bit of direction.
I'd like to implement ui.systemUsesDarkTheme
in Thunderbird in order to request dark mode for the preferences panel, account central, etc, when the user changes themes.
Is there a way to sync the ui.systemUsesDarkTheme
to which theme is currently selected?
Since the themeing part comes straight from m-c, I'm not sure what to look for to change that value accordingly.
Comment 11•5 years ago
|
||
Hi Alessandro, Firefox is affected by the same issue, see bug 1529323.
Implementing this in toolkit is trivial, the ui.systemUsesDarkTheme
pref can be set here: https://searchfox.org/mozilla-central/source/toolkit/modules/LightweightThemeConsumer.jsm#53-58
...except this would break the auto-switching of the default theme to the dark theme when the system theme changes, since that functionality relies itself on prefers-color-scheme: dark
. What I'd do here is make @media (-moz-system-dark-theme)
work differently from @media (prefers-color-scheme: dark)
, the former would only follow the system theme, while the latter would only follow the pref. Right now, the latter follows the pref if set, then tries to get the system theme. Emilio would probably be the best person to provide guidance on how to do this though.
Comment 12•5 years ago
|
||
This is just a dupe of bug 1529323.
Tim, shouldn't it be easier, instead of fiddling with prefs, to just use the override mechanism (which i built for devtools, but seems like it'd be applicable here as well)? That keeps @media (-moz-system-dark-theme)
working as is, which is what you want, really.
emulatePrefersColorScheme
allows you to tweak this on a per-document basis. We can decide whether to propagate it or not to content as needed too.
Comment 13•5 years ago
•
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #12)
This is just a dupe of bug 1529323.
I agree.
Tim, shouldn't it be easier, instead of fiddling with prefs, to just use the override mechanism (which i built for devtools, but seems like it'd be applicable here as well)? That keeps
@media (-moz-system-dark-theme)
working as is, which is what you want, really.
emulatePrefersColorScheme
allows you to tweak this on a per-document basis. We can decide whether to propagate it or not to content as needed too.
If we want bug 1529323 to apply to normal web pages as well (which I think would make sense), so effectively all documents except browser.xhtml (since it would define the browser theme based on user preference + system preference), then I'm not sure using the override mechanism all the time still makes sense. Wdyt ?
Comment 14•5 years ago
|
||
(In reply to Tim Nguyen :ntim from comment #13)
If we want bug 1529323 to apply to normal web pages as well (which I think would make sense), so effectively all documents except browser.xhtml (since it would define the browser theme based on user preference + system preference), then I'm not sure using the override mechanism all the time still makes sense. Wdyt ?
It's not clear it'd make sense to me, fwiw (it seems reasonable to me to want a dark firefox interface but light colors).
But anyhow yeah if you want that then the override mechanism is not great. Using the pref doesn't make sense as it's supposed to override the OS setting. We'd need a second pref or such that we could toggle, and that we'd check around here. Then the browser can tweak the pref at its will. Or something of that sort...
Assignee | ||
Updated•4 years ago
|
Description
•