From 582984f9092c532f41f9bd33bb2e60f3153986f8 Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Wed, 21 Oct 2026 20:36:47 +0200 Subject: [PATCH] Fill the whole page with the opaque background on macOS Content-sized pages like the Search empty state only got the opaque window background behind their own frame, leaving darker window material on both sides. --- Yattee/Views/Components/OpaqueWindowBackground.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Yattee/Views/Components/OpaqueWindowBackground.swift b/Yattee/Views/Components/OpaqueWindowBackground.swift index c2fe528e..8e47fd87 100644 --- a/Yattee/Views/Components/OpaqueWindowBackground.swift +++ b/Yattee/Views/Components/OpaqueWindowBackground.swift @@ -13,10 +13,15 @@ import SwiftUI /// material, which picks up a wallpaper tint (often bluish in dark mode) and /// clashes with views that draw `windowBackgroundColor` themselves (lists, /// gradient fades). No-op on other platforms. +/// +/// The view is expanded to fill the proposed space first, so content-sized +/// pages (empty states, placeholders, spinners) don't paint only a strip +/// behind themselves while the rest stays on the window material. struct OpaqueWindowBackgroundModifier: ViewModifier { func body(content: Content) -> some View { #if os(macOS) content + .frame(maxWidth: .infinity, maxHeight: .infinity) .background(Color(nsColor: .windowBackgroundColor).ignoresSafeArea()) #else content