From 8a3f76bb1dd7cf2d1271a4962cd47a8c7f976718 Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Sat, 9 May 2026 14:35:00 +0200 Subject: [PATCH] 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. --- Yattee/Views/Player/tvOS/TVDetailsPanel.swift | 6 +++--- Yattee/Views/Player/tvOS/TVPlayerView.swift | 20 ++++++++++++------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/Yattee/Views/Player/tvOS/TVDetailsPanel.swift b/Yattee/Views/Player/tvOS/TVDetailsPanel.swift index 60133bde..b155c18b 100644 --- a/Yattee/Views/Player/tvOS/TVDetailsPanel.swift +++ b/Yattee/Views/Player/tvOS/TVDetailsPanel.swift @@ -49,8 +49,8 @@ struct TVDetailsPanel: View { } } .pickerStyle(.segmented) - .padding(.horizontal, 120) - .padding(.top, 60) + .padding(.horizontal, 40) + .padding(.top, 40) .padding(.bottom, 20) .focused($focusedItem, equals: .tabPicker) .transition(.opacity.combined(with: .move(edge: .top))) @@ -65,7 +65,7 @@ struct TVDetailsPanel: View { commentsContent } } - .padding(.horizontal, 88) + .padding(.horizontal, 40) .frame(maxHeight: .infinity) } .frame(maxWidth: .infinity, maxHeight: .infinity) diff --git a/Yattee/Views/Player/tvOS/TVPlayerView.swift b/Yattee/Views/Player/tvOS/TVPlayerView.swift index f1ad7780..6b9ee76b 100644 --- a/Yattee/Views/Player/tvOS/TVPlayerView.swift +++ b/Yattee/Views/Player/tvOS/TVPlayerView.swift @@ -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