Closed Bug 1697565 Opened 3 years ago Closed 3 years ago

Default buttons don't respect the system accent color

Categories

(Core :: Widget: Cocoa, defect, P1)

All
macOS
defect

Tracking

()

RESOLVED FIXED
88 Branch
Tracking Status
firefox88 --- fixed

People

(Reporter: mstange, Assigned: mstange)

References

Details

(Whiteboard: [mac:darkmode])

Attachments

(4 files, 4 obsolete files)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review

In native-themed dialogs, we draw regular buttons with NSButtonCell and default buttons with HITheme. If the system accent color is not blue, this gives a strange frankenstein look.

With "force aqua" off, HITheme buttons also don't adopt the dark appearance properly, IIRC. So switching to NSButtonCell is needed for proper dark mode support.

TODO: Break out the mock active window part, with the following comment:

This causes CellDrawView to follow the system appearance, if widget.macos.respect-system-appearance is set to true:
It will inherit the effective appearance from the NSWindow, which inherits it from the NSApplication.
This makes search fields and checkboxes and so on react to appearance changes
properly. To test checkboxes, you can go to History -> Clear Recent History...

Depends on D107908

Blocks: 1697703

Depends on D108156

Attachment #9208224 - Attachment is obsolete: true
Attachment #9208613 - Attachment is obsolete: true
Attachment #9208614 - Attachment is obsolete: true
Attachment #9208615 - Attachment is obsolete: true
Pushed by mstange@themasta.com:
https://hg.mozilla.org/integration/autoland/rev/c2e7aeaf9b19
Remove unused bevel button enum values. r=mac-reviewers,bradwerth
https://hg.mozilla.org/integration/autoland/rev/4e0b839a26b5
Put the CellDrawView into a (never-shown) NSWindow, to allow drawing active default buttons. r=mac-reviewers,bradwerth
https://hg.mozilla.org/integration/autoland/rev/236dc5dd16e0
Draw default buttons with NSButtonCell, so that they adopt the system accent color. r=mac-reviewers,bradwerth
https://hg.mozilla.org/integration/autoland/rev/df4b939f11b7
Use eRegularPushButton for rounded bezel push buttons, because they now draw the same. r=mac-reviewers,bradwerth
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: