Extremely low contrast on stoplight buttons when Firefox is light and system is dark
Categories
(Core :: Widget: Cocoa, defect, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox89 | --- | verified |
People
(Reporter: bugzilla, Assigned: spohl)
References
Details
(Whiteboard: [mac:darkmode])
Attachments
(3 files)
STR:
- Set
widget.macos.respect-system-appearance
totrue
. - Set system theme to Dark.
- Enable a light Firefox theme, such as Light, Proton Light, or Google Chrome Light.
- Unfocus the Firefox window.
Actual results:
The stoplight buttons are white-on-white. Screenshot attached.
Expected: Dark grey stoplight buttons, like one sees when the system theme is Light.
I imagine this is because we're drawing the Dark mode stoplight buttons even when the Firefox theme is light.
Updated•3 years ago
|
Comment 1•3 years ago
|
||
We can fix this by overriding the NSWindow appearance with "aqua" (light) or "dark aqua" (dark) based on the selected Firefox theme.
In order to do that, we need to communicate GetDocumentLWTheme() == Document::Doc_Theme_Bright
to the nsIWidget. The code for that can be found in https://phabricator.services.mozilla.com/D104301 .
Comment 2•3 years ago
|
||
I would suggest an nsIWidget method called SetWindowAppearance(WindowAppearance aAppearance);
with enum class WindowAppearance : uint8_t { eSystem, eLight, eDark }
.
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 3•3 years ago
|
||
Assignee | ||
Comment 4•3 years ago
|
||
Depends on D109981
Pushed by spohl@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e70f3af0e7f2 Improve contrast of close, minimize and maximize buttons on macOS with a light Firefox theme when the system is in dark mode. r=mac-reviewers,mstange https://hg.mozilla.org/integration/autoland/rev/840762c09a0a Update references for Mac OS X to macOS in nsIWidget.h. r=mstange
Comment 6•3 years ago
|
||
Backed out 2 changesets (bug 1700371) as per dev's request
Backout:
https://hg.mozilla.org/integration/autoland/rev/42eb327519b3446b84e84f5ac7e93b8ee89689c5
Updated•3 years ago
|
Pushed by spohl@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a5f124d38938 Override the NSWindow appearance based on the lightweight theme. r=mac-reviewers,mstange https://hg.mozilla.org/integration/autoland/rev/8599b8c86aaf Update references for Mac OS X to macOS in nsIWidget.h. r=mstange
Comment 8•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/a5f124d38938
https://hg.mozilla.org/mozilla-central/rev/8599b8c86aaf
Updated•3 years ago
|
Comment 9•3 years ago
|
||
Reproduced the initial issue using old Nightly from 2021-03-23 on macOS 11.3, verified that this is fixed using Firefox 89.0beta10 on the same configuration.
Description
•