From aa809aaf90bab5fed479054eb100605412c33f64 Mon Sep 17 00:00:00 2001 From: Steffan Andrews Date: Thu, 13 Aug 2026 12:52:10 -0700 Subject: [PATCH 1/2] Refined menu window background visual effect on macOS 27 --- .../Utilities/VisualEffect.swift | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/Sources/MacControlCenterUI/Utilities/VisualEffect.swift b/Sources/MacControlCenterUI/Utilities/VisualEffect.swift index 35f8c9b..f218f57 100644 --- a/Sources/MacControlCenterUI/Utilities/VisualEffect.swift +++ b/Sources/MacControlCenterUI/Utilities/VisualEffect.swift @@ -92,12 +92,24 @@ extension VisualEffect { extension View { /// Applies the appropriate window background effect for the menu based on the current platform. + @ViewBuilder func menuBackgroundEffectForCurrentPlatform() -> some View { if #available(macOS 26.0, *) { - return backgroundStyle(.ultraThinMaterial /* .thinMaterial */ ) + menuBackgroundEffectForCurrentPlatformBase() .windowResizeAnchor(.topLeading) // helps with smooth menu window resize animations } else { - return background(VisualEffect.popoverWindow()) + menuBackgroundEffectForCurrentPlatformBase() + } + } + + @ViewBuilder + private func menuBackgroundEffectForCurrentPlatformBase() -> some View { + if #available(macOS 27.0, *) { + backgroundStyle(.regularMaterial) + } else if #available(macOS 26.0, *) { + backgroundStyle(.ultraThinMaterial) + } else { + background(VisualEffect.popoverWindow()) } } From 08f98dc5bf784589f00a1100555471271d96e810 Mon Sep 17 00:00:00 2001 From: Steffan Andrews Date: Thu, 13 Aug 2026 12:52:21 -0700 Subject: [PATCH 2/2] Updated Demo project --- Demo/Demo/ContentView.swift | 1 - 1 file changed, 1 deletion(-) diff --git a/Demo/Demo/ContentView.swift b/Demo/Demo/ContentView.swift index 2b15391..53037f1 100644 --- a/Demo/Demo/ContentView.swift +++ b/Demo/Demo/ContentView.swift @@ -20,6 +20,5 @@ struct ContentView: View { } .padding() .frame(minWidth: 500, minHeight: 350) - .background(VisualEffect.nonVibrant()) } }