Fix translucent menu bar popup background on macOS 26#566
Merged
Conversation
The popup's only fill was `.containerBackground(.windowBackground, for: .window)`. `.windowBackground` is a translucent material, so on macOS 26 Liquid Glass the window behind the popup bleeds through and the native chrome and shadow detach from the content, most visible on light backgrounds (issue #492). Use an opaque `NSColor.windowBackgroundColor` instead, keeping the window-container placement from #403 so the popup renders as one solid rounded panel in light and dark.
Greptile review: the Liquid Glass bleed-through (#492) is specific to macOS 26; `.windowBackground` renders correctly on macOS 15 through pre-26. Gate the opaque `windowBackgroundColor` to macOS 26+ and keep the material on 15-25 so the vibrant popup appearance is unchanged for the larger Sequoia base.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The menu bar popup (
MenuBarExtra(.window)) relied solely on.containerBackground(.windowBackground, for: .window)for its fill..windowBackgroundis a translucent material, so on macOS 26 (Liquid Glass) the window or desktop behind the popup bleeds through and the native window chrome and its shadow appear detached from the content, most visible on light backgrounds (issue #492). This swaps the material for an opaqueNSColor.windowBackgroundColor, keeping the window-container placement introduced in #403 so the popup renders as one solid rounded panel in both light and dark.Validation
Not yet confirmed visually end-to-end: the reporter's screenshot is on macOS 26.5 in light mode, and I could not reproduce a clean before/after capture on a light-mode desktop in this environment. Recommend a quick manual check on macOS 26: open the popup over a light or busy window (e.g. a browser) and confirm the background is opaque to the rounded edge with the shadow hugging the content, then sanity-check dark mode.
Linked issues
Fixes #492
Refs #403, #402 (the prior double-border fix this change evolves)
Risk / rollout notes
#available(macOS 15.0, *)guard and the macOS 14 fallback path are unchanged. Shipping baseline is macOS 15+ regardless, so every user hits the updated branch.NSColor.windowBackgroundColoris opaque and adapts to light/dark appearance. The intended trade-off is that the popup no longer picks up a translucent Liquid Glass tint, since that translucency was the source of the bug.Greptile Summary
This PR fixes a translucent bleed-through bug in the menu bar popup on macOS 26 (Liquid Glass), where
.windowBackground— a translucent material — let the app or desktop behind the popup show through, causing the native chrome and shadow to appear detached from the content. The fix adds a narrowly-scoped#available(macOS 26.0, *)branch that replaces the material with an opaqueColor(nsColor: .windowBackgroundColor), while the macOS 15–25 path keeps the original vibrant material unchanged.NSColor.windowBackgroundColorfill; macOS 15–25 continues to use.windowBackgroundfor vibrant/translucent appearance, preserving the prior behavior.MenuBarWindowBackgroundModifier, a single private struct with no behavioral impact outside the popup's presentation layer.Confidence Score: 5/5
Safe to merge; the change is a one-file, presentation-layer fix with no behavioral impact outside the menu bar popup.
The three-way availability guard is correctly ordered and properly scoped: macOS 26+ gets the opaque fix, macOS 15–25 keeps the original vibrant material, and macOS 14 keeps the no-op path. Color(nsColor: .windowBackgroundColor) conforms to ShapeStyle so the containerBackground call is type-safe, and the color is system-adaptive (light/dark). No logic outside this modifier is touched.
No files require special attention; manual visual verification on macOS 26 in light mode (as noted in the PR description) is the only remaining validation gap.
Important Files Changed
.windowBackgroundmaterial for an opaqueColor(nsColor: .windowBackgroundColor), while preserving the original vibrant-material path for macOS 15–25.Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[MenuBarWindowBackgroundModifier.body] --> B{macOS 26+?} B -- Yes --> C["containerBackground(Color(nsColor: .windowBackgroundColor), for: .window)\nOpaque fill — fixes Liquid Glass bleed-through #492"] B -- No --> D{macOS 15+?} D -- Yes --> E["containerBackground(.windowBackground, for: .window)\nVibrant material — original behavior preserved"] D -- No --> F["content (no background modifier)\nFallback for macOS 14 and below"]Reviews (2): Last reviewed commit: "Limit opaque popup fill to macOS 26, kee..." | Re-trigger Greptile