From 77d982f42223bd824e158c2e3a89286ba6d9033a Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Thu, 16 Apr 2026 22:57:46 +0200 Subject: [PATCH] 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. --- .../Views/Player/QualitySelectorView+Sections.swift | 12 ++++++++++++ Yattee/Views/Player/QualitySelectorView.swift | 7 +++++++ Yattee/Views/Player/tvOS/TVPlayerView.swift | 9 +++------ 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/Yattee/Views/Player/QualitySelectorView+Sections.swift b/Yattee/Views/Player/QualitySelectorView+Sections.swift index 9391f599..567afecc 100644 --- a/Yattee/Views/Player/QualitySelectorView+Sections.swift +++ b/Yattee/Views/Player/QualitySelectorView+Sections.swift @@ -206,7 +206,11 @@ extension QualitySelectorView { } .padding() } + #if os(tvOS) + .background(Color.clear) + #else .background(ListBackgroundStyle.grouped.color) + #endif .navigationTitle(String(localized: "player.quality.video")) #if os(iOS) .navigationBarTitleDisplayMode(.inline) @@ -221,7 +225,11 @@ extension QualitySelectorView { } .padding() } + #if os(tvOS) + .background(Color.clear) + #else .background(ListBackgroundStyle.grouped.color) + #endif .navigationTitle(String(localized: "stream.audio")) #if os(iOS) .navigationBarTitleDisplayMode(.inline) @@ -236,7 +244,11 @@ extension QualitySelectorView { } .padding() } + #if os(tvOS) + .background(Color.clear) + #else .background(ListBackgroundStyle.grouped.color) + #endif .navigationTitle(String(localized: "stream.subtitles")) #if os(iOS) .navigationBarTitleDisplayMode(.inline) diff --git a/Yattee/Views/Player/QualitySelectorView.swift b/Yattee/Views/Player/QualitySelectorView.swift index 17d0b40c..502cab07 100644 --- a/Yattee/Views/Player/QualitySelectorView.swift +++ b/Yattee/Views/Player/QualitySelectorView.swift @@ -186,7 +186,14 @@ struct QualitySelectorView: View { 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) + #endif .navigationTitle(navigationTitle) #if os(iOS) .navigationBarTitleDisplayMode(.inline) diff --git a/Yattee/Views/Player/tvOS/TVPlayerView.swift b/Yattee/Views/Player/tvOS/TVPlayerView.swift index cb1ddd52..1a846235 100644 --- a/Yattee/Views/Player/tvOS/TVPlayerView.swift +++ b/Yattee/Views/Player/tvOS/TVPlayerView.swift @@ -133,8 +133,9 @@ struct TVPlayerView: View { let supportedFormats = playerService.currentBackendType.supportedFormats ZStack { - // Dimmed backdrop over the video - Color.black.opacity(0.7) + // Glass backdrop — matches info/comments panel for visual uniformity + Rectangle() + .fill(.ultraThinMaterial) .ignoresSafeArea() QualitySelectorView( @@ -179,10 +180,6 @@ struct TVPlayerView: View { } ) .frame(maxWidth: 900, maxHeight: 700) - .background( - RoundedRectangle(cornerRadius: 24, style: .continuous) - .fill(.ultraThinMaterial) - ) .padding(.horizontal, 200) .padding(.vertical, 80) }