mirror of
https://github.com/yattee/yattee.git
synced 2026-06-27 00:54:21 +00:00
Use menu-style pickers in tvOS settings
Introduce PlatformMenuPicker that wraps short-option pickers in LabeledContent + .pickerStyle(.menu) on tvOS so they render as a compact dropdown instead of pushing a full-screen option list. On iOS/macOS it falls through to a plain Picker, leaving rendering unchanged. Applied across Playback, Subtitles, Sidebar, Privacy, and Advanced settings. Long language lists in PlaybackSettingsView are left as push-style.
This commit is contained in:
@@ -37,7 +37,7 @@ struct SubtitlesSettingsView: View {
|
||||
|
||||
private var fontSection: some View {
|
||||
Section {
|
||||
Picker(
|
||||
PlatformMenuPicker(
|
||||
String(localized: "settings.subtitles.font"),
|
||||
selection: $settings.font
|
||||
) {
|
||||
@@ -49,7 +49,7 @@ struct SubtitlesSettingsView: View {
|
||||
|
||||
#if os(tvOS)
|
||||
// tvOS uses Picker instead of Slider (Slider unavailable)
|
||||
Picker(String(localized: "settings.subtitles.fontSize"), selection: $settings.fontSize) {
|
||||
PlatformMenuPicker(String(localized: "settings.subtitles.fontSize"), selection: $settings.fontSize) {
|
||||
ForEach([20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100], id: \.self) { size in
|
||||
Text("settings.subtitles.fontSize \(size)").tag(size)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user