Closed Bug 1697338 Opened 4 years ago Closed 4 years ago

Make context menus, tooltips, and vibrant sidebars adapt to the system appearance, if widget.respect-system-appearance is set to true

Categories

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

All
macOS
task

Tracking

()

RESOLVED FIXED
88 Branch
Tracking Status
firefox88 --- fixed

People

(Reporter: mstange, Assigned: mstange)

References

Details

(Whiteboard: [mac:darkmode][mac:mr1])

Attachments

(7 files, 1 obsolete file)

(deleted), text/plain
Details
(deleted), text/plain
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details

Our tooltips and context menus currently have their vibrancy set to "always light" regardless of the system appearance. This causes clashes once we stop forcing the aqua theme, because then the text color does respect the system appearance, and we get white text on light menus / tooltips.

So this bug is about using the system appearance for tooltip and menu vibrancy. This will not change anything for our users until bug 1623686 is also fixed. But we can't fix bug 1623686 without making this work.

TODO: fontsmoothing-background-colors need tweaking

Depends on D107750

Summary: Make context menus and tooltips adapt to the system appearance, if widget.respect-system-appearance is set → Make context menus, tooltips, and vibrant sidebars adapt to the system appearance, if widget.respect-system-appearance is set
Blocks: 1641252
Summary: Make context menus, tooltips, and vibrant sidebars adapt to the system appearance, if widget.respect-system-appearance is set → Make context menus, tooltips, and vibrant sidebars adapt to the system appearance, if widget.respect-system-appearance is set to true
Whiteboard: [mac:darkmode][mac:mr1]
Attachment #9207942 - Attachment description: Bug 1697338 - WIP: Make context menus and tooltips adapt to the system theme, if widget.respect-system-appearance is set to true. → Bug 1697338 - WIP: Make context menus and tooltips adapt to the system theme, if widget.macos.respect-system-appearance is set to true.
Attached file output on 10.14 (deleted) —

Starting with macOS 10.14, the generic light/dark vibrancy is deprecated, and semantic vibrancy names are preferred.
If we ever need more vibrancy, we can add new values with semantic names.

Depends on D107910

With this patch, we will no longer use the vibrant appearance names on 10.14+,
as suggested in the 10.14 release notes:

For apps linked against the macOS 10.14 SDK, NSVisualEffectView automatically
uses the correct vibrant NSAppearance as its appearance, based on the
appearance of its superview. For example, if its superview uses the aqua
appearance, NSVisualEffectView uses vibrantLight. As a result, you shouldn’t
explicitly set the appearance of the NSVisualEffectView, either in code or in
Interface Builder. Explicitly setting the appearance was necessary in earlier
versions of macOS."

The above applies to us even while we still link to the 10.12 SDK, because we
now set the "requires aqua appearance" plist flag to false (since bug 1697331).

Depends on D108154

Attachment #9207942 - Attachment is obsolete: true
Pushed by mstange@themasta.com: https://hg.mozilla.org/integration/autoland/rev/4712efb9a443 Remove unused -moz-default-appearance values -moz-mac-vibrancy-light/dark, and the system colors of the same name. r=emilio https://hg.mozilla.org/integration/autoland/rev/c7bcee7946f0 Rename VibrancyType::LIGHT/DARK to TITLEBAR_LIGHT/DARK. r=mac-reviewers,bradwerth https://hg.mozilla.org/integration/autoland/rev/00d4d012adfe Use semantic vibrancy material names for all vibrancy types, and stop using the appearance-based material which is deprecated. r=mac-reviewers,bradwerth https://hg.mozilla.org/integration/autoland/rev/167d55a97ce8 Make context menus and tooltips adapt to the system appearance, if widget.macos.respect-system-appearance is set to true. r=mac-reviewers,bradwerth https://hg.mozilla.org/integration/autoland/rev/caac819bb7ee Update font-smoothing background colors, and make them respect dark mode. r=emilio
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: