Closed Bug 1697336 Opened 4 years ago Closed 4 years ago

Make various toolbar-related -moz-default-appearance values adapt to the system appearance

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

(2 files, 1 obsolete file)

Once we stop forcing the aqua appearance, our CSS colors will change in response to the system theme; for example, -moz-FieldText will become white if macOS Dark Mode is active.

In order for this to not make the library window unreadable, we need to fix various toolbar-related -moz-default-appearance values so that they also adapt to Dark Mode properly.

Blocks: 1623686
No longer depends on: 1623686

-moz-default-appearance: toolbar is still used to determine the size of the titlebar / toolbar.
But the actual -moz-default-appearance rendering draws nothing and lets the toolbar rendering shine
through from the window background.

Using NSVisualEffectView for the titlebar/toolbar respects desktop tinting on
Big Sur and can correctly adapt to Dark Mode.
On older versions of macOS, it draws the correct gradient.

This can be tested in the bookmarks library window.

TODO:

  • Draw separator at the bottom in MOZTitlebarView
  • Draw separator at the bottom in nsNativeThemeCocoa for non-unified toolbars

Depends on D107751

On a toolbar of the right color, the "toolbar searchfield" looks good.

Depends on D107752

This was only needed when we were drawing a 10.9-style toolbar gradient. With a
native toolbar appearance, the default drawing looks better.

Depends on D107753

Blocks: 1641252
Depends on: 1697350
Whiteboard: [mac:darkmode][mac:mr1]
Blocks: 1697703
Attachment #9207943 - Attachment description: Bug 1697336 - WIP: Draw the titlebar / unified toolbar as an NSVisualEffectView. → Bug 1697336 - Draw the titlebar / unified toolbar with an NSVisualEffectView. r=#mac-reviewers
Attachment #9207944 - Attachment description: Bug 1697336 - WIP: Remove Big Sur override code that made the toolbar search field look different. → Bug 1697336 - Remove Big Sur override code that made the toolbar search field look different. r=#mac-reviewers
Attachment #9207945 - Attachment description: Bug 1697336 - WIP: Stop drawing opaque button shapes behind toolbar buttons on Big Sur. → Bug 1697336 - Stop drawing opaque button shapes behind toolbar buttons on Big Sur. r=#mac-reviewers

Comment on attachment 9207945 [details]
Bug 1697336 - Stop drawing opaque button shapes behind toolbar buttons on Big Sur. r=#mac-reviewers

Revision D107754 was moved to bug 1699221. Setting attachment 9207945 [details] to obsolete.

Attachment #9207945 - Attachment is obsolete: true
Pushed by mstange@themasta.com: https://hg.mozilla.org/integration/autoland/rev/7050ec84622b Draw the titlebar / unified toolbar with an NSVisualEffectView. r=mac-reviewers,bradwerth https://hg.mozilla.org/integration/autoland/rev/390eb111c942 Remove Big Sur override code that made the toolbar search field look different. r=mac-reviewers,bradwerth
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: