Make dark theme affect all windows, if widget.macos.respect-system-appearance is true
Categories
(Core :: Widget: Cocoa, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox91 | --- | fixed |
People
(Reporter: mstange, Assigned: mstange)
References
Details
Attachments
(2 files)
Let's remove support for per-window light/dark mode, and instead make it a Firefox-wide setting which affects all windows.
At the moment, if the Firefox theme is Dark but the macOS theme is Light, then browser windows follow the Firefox theme and other windows (Download dialog, Page Info window, Library window) follow the system theme. It is much easier to make all windows follow the Firefox theme. If the user wants to use the macOS theme, they can select the Firefox "System" theme, and all Firefox windows will match the macOS theme.
Background:
Many of the remaining bugs for full dark mode support (bug 1623686) only occur when the Firefox theme differs from the macOS theme, i.e. light/dark or dark/light: bug 1703980, bug 1705821, bug 1710122, bug 1710164. The challenge in those bugs is inheriting the right theme down into sub-windows, e.g. sheet windows or popups/panels. But if there is only one global theme, then we don't need to do any inheriting.
This will change the meaning of the widget.macos.respect-system-appearance pref: The system appearance will only respected if the Firefox System theme is selected. The pref will then only affect what happens when Firefox is in the Dark theme: If the pref is off, CSS colors and -moz-default-appearance drawing will be light, and if the pref is on, CSS colors and -moz-default-appearance will be dark. So then it would make sense to rename the pref. A very truthful pref name would be widget.macos.support-dark-appearance-for-system-colors-and-native-theme-drawing but that's quite a mouthful.
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 1•2 years ago
|
||
This patch also removes the pref widget.system-colors-follow-theme, which was
only true on macOS. System colors now follow the global Firefox theme.
Assignee | ||
Comment 2•2 years ago
|
||
Depends on D117098
Pushed by mstange@themasta.com: https://hg.mozilla.org/integration/autoland/rev/cc07129dbc8e Rename widget.macos.respect-system-appearance to widget.macos.support-dark-appearance, and make the Firefox theme affect all windows if the pref is true. r=emilio https://hg.mozilla.org/integration/autoland/rev/259f602b8949 Remove now-unnecessary per-window appearance override. This reverts bug 1700371. r=emilio
![]() |
||
Comment 4•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/cc07129dbc8e
https://hg.mozilla.org/mozilla-central/rev/259f602b8949
Comment 5•2 years ago
|
||
Is this something we should consider for Beta backport?
Assignee | ||
Comment 6•2 years ago
|
||
(In reply to Ryan VanderMeulen [:RyanVM] from comment #5)
Is this something we should consider for Beta backport?
It doesn't have any effect unless the pref is set, and the pref still defaults to false. We've only started enabling the pref in 91 Nightly + Early Beta, in bug 1715619. And the pref flip isn't something we want to uplift, so this isn't needed either.
Description
•