Closed Bug 1764822 Opened 3 years ago Closed 1 year ago

Implement (or mock) Windows 11 Mica (acrylic backdrop) for the title bar

Categories

(Core :: Widget: Win32, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
133 Branch
Tracking Status
firefox133 --- fixed

People

(Reporter: saschanaz, Assigned: emilio)

References

(Blocks 1 open bug, )

Details

Attachments

(1 file)

Windows 11 is getting acrylic context menu in several places including File Explorer, the taskbar, Photos, and Microsoft Edge. I guess we'll want to follow as we already have done same in macOS (at least per what I see in bug 1764683).

Severity: -- → S3
Priority: -- → P2
Summary: Allow context menus to be acrylic on Windows 11 → Implement (or mock) Windows 11 Mica effect for the title bar and context menu
Summary: Implement (or mock) Windows 11 Mica effect for the title bar and context menu → Implement (or mock) Windows 11 Mica (acrylic backdrop) for the title bar and context menu

This looks similar to the already-existing macOS vibrancy support, perhaps?

I agree for the context menu, but does it also apply to the browser chrome on macOS?

It only applies to context menus and the places sidebar by default.

Context menus don’t use Mica, but Acrylic. Just thought I’d point it out, given the bug’s current title.

It would be great to support for acrylic backdrop not only in context menus, but arrow panels as well. Similar to how vibrancy backdrop is applied on MacOS when "-moz-mac-source-list" appearance is set on the :root element.

bug 1850979 has a very rough hack that does some / most of it.

See Also: → 1850979

(But I'd appreciate someone more familiar with Windows bits and compositing to carry it over the finish line)

Win32Acrylic seems to be a reasonable implementation of the Acrylic/Mica brush in a Win32 environment without any Win2D cruft. Something like that could potentially be a better solution than setting the backdrop material with DwmSetWindowAttribute.

It's worth noting that both (Edge)[https://winaero.com/edge-restores-mica-for-titlebar-and-toolbar-heres-how-to-enable-it/] and (Chrome)[https://winaero.com/chrome-now-supports-mica-effect-on-its-title-bar/] are currently testing Mica in their titlebars; Firefox risks looking outdated by comparison once the other browsers have enabled this by default.

See Also: → 1886729

When are you planning to add this effect? Is there any schedule or at least an approximate deadline? Many would like to be able to use this effect, at least through an experimental key.

Thanks for working on this! I need to use Firefox as my main browser app at work for its extension support, so I'd love to see this feature. Just wanted to voice my support for this enhancement.

I developed a WinUI 3 app at work, which takes advantage of Mica material. According to Microsoft, Mica Alt is designed "to provide a deeper visual hierarchy than Mica, especially when creating an app with a tabbed title bar", and I can see that this has already been considered inside 1850979 (Mica hack), which is great. In addition, Microsoft also states that for "apps with context menus, flyouts, non-modal popups, or light-dismiss panes, we recommend that you use background acrylic, especially if these surfaces draw outside the frame of the main app window". Accordingly, Edge uses background acrylic for these items.

Depends on: 1905257

Any progress on this?

(In reply to mbg from comment #12)

Any progress on this?

There has been, though it's all been in the background so far — our long-neglected handling of transparent windows on Windows (on which translucency depends) has been getting a rework and bugfixes.

That's great to hear! Can't wait for it to come out

This is somewhat straight-forward now that all the dependencies are
landed.

I think we do need to find a solution to make the app titlebar buttons
taller, by hiding the caption buttons
(https://phabricator.services.mozilla.com/D207303 tried to do this, but
ran into other issues), or making the titlebar taller, which is doable
in UWP at least, but I don't see any way of doing it in win32 apps:

But still this is usable and would be worth getting in, since it's
needed for the translucent sidebar work too.

Assignee: nobody → emilio
Status: NEW → ASSIGNED
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/67cca07bbf52 Implement mica titlebar behind a (default off) pref. r=desktop-theme-reviewers,win-reviewers,dao,rkraesig
Pushed by emilio@crisal.io: https://hg.mozilla.org/integration/autoland/rev/0ce6969791a6 Move MicaEnabled() definition outside #ifdefs.
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 133 Branch

Let's split context menu thing.

Summary: Implement (or mock) Windows 11 Mica (acrylic backdrop) for the title bar and context menu → Implement (or mock) Windows 11 Mica (acrylic backdrop) for the title bar
Regressions: 1924940
Depends on: 1923334, 1911763
No longer depends on: 1905257
See Also: → 1905257
Depends on: 1934040
Blocks: 1934136
Blocks: 1934137
Blocks: 1934138
Blocks: 1934139
Blocks: 1934140
Blocks: windows-mica
No longer depends on: 1934040
No longer blocks: 1934139
No longer blocks: 1934136
No longer blocks: 1934140
No longer blocks: 1934138
No longer blocks: 1934137
No longer blocks: 1924741
Blocks: 1850979
See Also: 1850979
Regressions: 1943517
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: