From 58c3bdc0b6ac5d9e4d7367be5346703e2ae0e323 Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Mon, 13 Apr 2026 21:31:15 +0200 Subject: [PATCH] Wrap View Options sheet in NavigationStack on tvOS for picker labels The .pickerStyle(.menu) hid labels. Instead, wrap the Form in a NavigationStack on tvOS so the default navigation picker style works and shows both labels and values. --- Yattee/Views/Components/ViewOptionsSheet.swift | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Yattee/Views/Components/ViewOptionsSheet.swift b/Yattee/Views/Components/ViewOptionsSheet.swift index da194d5d..ff36edf2 100644 --- a/Yattee/Views/Components/ViewOptionsSheet.swift +++ b/Yattee/Views/Components/ViewOptionsSheet.swift @@ -32,6 +32,16 @@ struct ViewOptionsSheet: View { } var body: some View { + #if os(tvOS) + NavigationStack { + formContent + } + #else + formContent + #endif + } + + private var formContent: some View { Form { // Single section with all options Section { @@ -55,9 +65,6 @@ struct ViewOptionsSheet: View { Text("viewOptions.rowSize.regular").tag(VideoRowStyle.regular) Text("viewOptions.rowSize.large").tag(VideoRowStyle.large) } - #if os(tvOS) - .pickerStyle(.menu) - #endif } // Grid-specific options @@ -68,7 +75,6 @@ struct ViewOptionsSheet: View { Text("\(count)").tag(count) } } - .pickerStyle(.menu) #else Stepper( "viewOptions.columns \(effectiveColumns)", @@ -90,9 +96,6 @@ struct ViewOptionsSheet: View { Text(size.displayName).tag(size) } } - #if os(tvOS) - .pickerStyle(.menu) - #endif } } }