mirror of
https://github.com/yattee/yattee.git
synced 2026-06-08 07:44:21 +00:00
Constrain tvOS details panel to right half of screen
Full-screen glass overlay was excessive on 4K displays and fully hid the video. Wrap the panel in a GeometryReader sized to half the parent width, slide it in from the trailing edge, and tighten internal horizontal/top padding now that the content lives in a narrower column.
This commit is contained in:
@@ -264,14 +264,20 @@ struct TVPlayerView: View {
|
||||
.disabled(!shouldShowControls)
|
||||
.animation(.easeInOut(duration: 0.25), value: shouldShowControls)
|
||||
|
||||
// Swipe-up details panel
|
||||
// Right-side details panel (covers ~50% of screen)
|
||||
if isDetailsPanelVisible {
|
||||
TVDetailsPanel(
|
||||
video: playerState?.currentVideo,
|
||||
initialTab: detailsPanelInitialTab,
|
||||
onDismiss: { hideDetailsPanel() }
|
||||
)
|
||||
.transition(.move(edge: .bottom).combined(with: .opacity))
|
||||
GeometryReader { geo in
|
||||
HStack(spacing: 0) {
|
||||
Spacer(minLength: 0)
|
||||
TVDetailsPanel(
|
||||
video: playerState?.currentVideo,
|
||||
initialTab: detailsPanelInitialTab,
|
||||
onDismiss: { hideDetailsPanel() }
|
||||
)
|
||||
.frame(width: geo.size.width / 2)
|
||||
}
|
||||
}
|
||||
.transition(.move(edge: .trailing).combined(with: .opacity))
|
||||
}
|
||||
|
||||
// Debug overlay
|
||||
|
||||
Reference in New Issue
Block a user