Unify macOS content view backgrounds with opaque window background

Views without an explicit background sat on the translucent window
material, which picks up a wallpaper tint (bluish in dark mode) and
clashed with views drawing windowBackgroundColor, making the video
info header gradient fade visibly mismatch. Add opaqueWindowBackground()
and apply it centrally in NavigationDestinationHandlerModifier to both
stack roots and pushed destinations, plus VideoInfoView for
presentations outside navigation stacks.

Claude-Session: https://claude.ai/code/session_0154KH8RAVAvm6iVanhmoW8o
This commit is contained in:
Arkadiusz Fal
2026-07-06 09:36:49 +02:00
parent 48378d7ca8
commit 8d4f472348
3 changed files with 45 additions and 5 deletions

View File

@@ -259,6 +259,9 @@ struct VideoInfoView: View {
videoContent
}
}
// Opaque background so the header gradient (which fades to windowBackgroundColor)
// blends seamlessly even when presented outside a navigation stack.
.opaqueWindowBackground()
.task {
await loadInitialVideoIfNeeded()
}