mirror of
https://github.com/yattee/yattee.git
synced 2026-05-12 18:35:05 +00:00
Use glass background for tvOS player settings sheet
Match the info/comments and queue panels by replacing the black dim and inner rounded card with a full-screen ultraThinMaterial backdrop and a transparent list background on tvOS.
This commit is contained in:
@@ -206,7 +206,11 @@ extension QualitySelectorView {
|
|||||||
}
|
}
|
||||||
.padding()
|
.padding()
|
||||||
}
|
}
|
||||||
|
#if os(tvOS)
|
||||||
|
.background(Color.clear)
|
||||||
|
#else
|
||||||
.background(ListBackgroundStyle.grouped.color)
|
.background(ListBackgroundStyle.grouped.color)
|
||||||
|
#endif
|
||||||
.navigationTitle(String(localized: "player.quality.video"))
|
.navigationTitle(String(localized: "player.quality.video"))
|
||||||
#if os(iOS)
|
#if os(iOS)
|
||||||
.navigationBarTitleDisplayMode(.inline)
|
.navigationBarTitleDisplayMode(.inline)
|
||||||
@@ -221,7 +225,11 @@ extension QualitySelectorView {
|
|||||||
}
|
}
|
||||||
.padding()
|
.padding()
|
||||||
}
|
}
|
||||||
|
#if os(tvOS)
|
||||||
|
.background(Color.clear)
|
||||||
|
#else
|
||||||
.background(ListBackgroundStyle.grouped.color)
|
.background(ListBackgroundStyle.grouped.color)
|
||||||
|
#endif
|
||||||
.navigationTitle(String(localized: "stream.audio"))
|
.navigationTitle(String(localized: "stream.audio"))
|
||||||
#if os(iOS)
|
#if os(iOS)
|
||||||
.navigationBarTitleDisplayMode(.inline)
|
.navigationBarTitleDisplayMode(.inline)
|
||||||
@@ -236,7 +244,11 @@ extension QualitySelectorView {
|
|||||||
}
|
}
|
||||||
.padding()
|
.padding()
|
||||||
}
|
}
|
||||||
|
#if os(tvOS)
|
||||||
|
.background(Color.clear)
|
||||||
|
#else
|
||||||
.background(ListBackgroundStyle.grouped.color)
|
.background(ListBackgroundStyle.grouped.color)
|
||||||
|
#endif
|
||||||
.navigationTitle(String(localized: "stream.subtitles"))
|
.navigationTitle(String(localized: "stream.subtitles"))
|
||||||
#if os(iOS)
|
#if os(iOS)
|
||||||
.navigationBarTitleDisplayMode(.inline)
|
.navigationBarTitleDisplayMode(.inline)
|
||||||
|
|||||||
@@ -186,7 +186,14 @@ struct QualitySelectorView: View {
|
|||||||
streamsContent
|
streamsContent
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#if os(tvOS)
|
||||||
|
// On tvOS the quality sheet is presented over the player with an outer
|
||||||
|
// ultraThinMaterial backdrop (see TVPlayerView.qualitySheetContent), so
|
||||||
|
// the list itself must be transparent to let the glass show through.
|
||||||
|
.background(Color.clear)
|
||||||
|
#else
|
||||||
.background(ListBackgroundStyle.grouped.color)
|
.background(ListBackgroundStyle.grouped.color)
|
||||||
|
#endif
|
||||||
.navigationTitle(navigationTitle)
|
.navigationTitle(navigationTitle)
|
||||||
#if os(iOS)
|
#if os(iOS)
|
||||||
.navigationBarTitleDisplayMode(.inline)
|
.navigationBarTitleDisplayMode(.inline)
|
||||||
|
|||||||
@@ -133,8 +133,9 @@ struct TVPlayerView: View {
|
|||||||
let supportedFormats = playerService.currentBackendType.supportedFormats
|
let supportedFormats = playerService.currentBackendType.supportedFormats
|
||||||
|
|
||||||
ZStack {
|
ZStack {
|
||||||
// Dimmed backdrop over the video
|
// Glass backdrop — matches info/comments panel for visual uniformity
|
||||||
Color.black.opacity(0.7)
|
Rectangle()
|
||||||
|
.fill(.ultraThinMaterial)
|
||||||
.ignoresSafeArea()
|
.ignoresSafeArea()
|
||||||
|
|
||||||
QualitySelectorView(
|
QualitySelectorView(
|
||||||
@@ -179,10 +180,6 @@ struct TVPlayerView: View {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
.frame(maxWidth: 900, maxHeight: 700)
|
.frame(maxWidth: 900, maxHeight: 700)
|
||||||
.background(
|
|
||||||
RoundedRectangle(cornerRadius: 24, style: .continuous)
|
|
||||||
.fill(.ultraThinMaterial)
|
|
||||||
)
|
|
||||||
.padding(.horizontal, 200)
|
.padding(.horizontal, 200)
|
||||||
.padding(.vertical, 80)
|
.padding(.vertical, 80)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user