mirror of
https://github.com/yattee/yattee.git
synced 2025-08-09 20:24:06 +00:00
Set full screen views background color based on color scheme on tvOS (fixes #30)
This commit is contained in:
@@ -25,13 +25,19 @@ struct DetailBadge: View {
|
||||
}
|
||||
|
||||
struct DefaultStyleModifier: ViewModifier {
|
||||
@Environment(\.colorScheme) private var colorScheme
|
||||
|
||||
func body(content: Content) -> some View {
|
||||
if #available(iOS 15.0, macOS 12.0, tvOS 15.0, *) {
|
||||
content
|
||||
.background(.thinMaterial)
|
||||
} else {
|
||||
content
|
||||
.background(Color.background.opacity(0.95))
|
||||
#if os(tvOS)
|
||||
.background(Color.background(scheme: colorScheme))
|
||||
#else
|
||||
.background(Color.background.opacity(0.95))
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user