Use menu picker style for tvOS view options sheets

This commit is contained in:
Arkadiusz Fal
2026-04-17 06:58:43 +02:00
parent 2efa0708c8
commit a0015086a2
4 changed files with 8 additions and 8 deletions

View File

@@ -55,7 +55,7 @@ struct ViewOptionsSheet: View {
.pickerStyle(.segmented) .pickerStyle(.segmented)
if layout == .list { if layout == .list {
Picker("viewOptions.rowSize", selection: $rowStyle) { PlatformMenuPicker(String(localized: "viewOptions.rowSize"), selection: $rowStyle) {
Text("viewOptions.rowSize.compact").tag(VideoRowStyle.compact) Text("viewOptions.rowSize.compact").tag(VideoRowStyle.compact)
Text("viewOptions.rowSize.regular").tag(VideoRowStyle.regular) Text("viewOptions.rowSize.regular").tag(VideoRowStyle.regular)
Text("viewOptions.rowSize.large").tag(VideoRowStyle.large) Text("viewOptions.rowSize.large").tag(VideoRowStyle.large)
@@ -76,7 +76,7 @@ struct ViewOptionsSheet: View {
} }
if let channelStripSize = channelStripSize { if let channelStripSize = channelStripSize {
Picker("viewOptions.channelStrip", selection: channelStripSize) { PlatformMenuPicker(String(localized: "viewOptions.channelStrip"), selection: channelStripSize) {
ForEach(ChannelStripSize.allCases, id: \.self) { size in ForEach(ChannelStripSize.allCases, id: \.self) { size in
Text(size.displayName).tag(size) Text(size.displayName).tag(size)
} }
@@ -112,7 +112,7 @@ struct ViewOptionsSheet: View {
// List-specific options // List-specific options
if layout == .list { if layout == .list {
Picker("viewOptions.rowSize", selection: $rowStyle) { PlatformMenuPicker(String(localized: "viewOptions.rowSize"), selection: $rowStyle) {
Text("viewOptions.rowSize.compact").tag(VideoRowStyle.compact) Text("viewOptions.rowSize.compact").tag(VideoRowStyle.compact)
Text("viewOptions.rowSize.regular").tag(VideoRowStyle.regular) Text("viewOptions.rowSize.regular").tag(VideoRowStyle.regular)
Text("viewOptions.rowSize.large").tag(VideoRowStyle.large) Text("viewOptions.rowSize.large").tag(VideoRowStyle.large)
@@ -143,7 +143,7 @@ struct ViewOptionsSheet: View {
// Channel Strip (subscriptions only) // Channel Strip (subscriptions only)
if let channelStripSize = channelStripSize { if let channelStripSize = channelStripSize {
Picker("viewOptions.channelStrip", selection: channelStripSize) { PlatformMenuPicker(String(localized: "viewOptions.channelStrip"), selection: channelStripSize) {
ForEach(ChannelStripSize.allCases, id: \.self) { size in ForEach(ChannelStripSize.allCases, id: \.self) { size in
Text(size.displayName).tag(size) Text(size.displayName).tag(size)
} }

View File

@@ -25,7 +25,7 @@ struct MediaBrowserViewOptionsSheet: View {
Form { Form {
Section { Section {
Toggle("mediaBrowser.viewOptions.showOnlyPlayable", isOn: $showOnlyPlayable) Toggle("mediaBrowser.viewOptions.showOnlyPlayable", isOn: $showOnlyPlayable)
Picker("mediaBrowser.viewOptions.sortBy", selection: $sortOrder) { PlatformMenuPicker(String(localized: "mediaBrowser.viewOptions.sortBy"), selection: $sortOrder) {
ForEach(availableSortOptions) { order in ForEach(availableSortOptions) { order in
Label(order.displayName, systemImage: order.systemImage) Label(order.displayName, systemImage: order.systemImage)
.tag(order) .tag(order)

View File

@@ -135,7 +135,7 @@ struct ManageChannelsView: View {
// List-specific options // List-specific options
if layout == .list { if layout == .list {
Picker("viewOptions.rowSize", selection: $rowStyle) { PlatformMenuPicker(String(localized: "viewOptions.rowSize"), selection: $rowStyle) {
Text("viewOptions.rowSize.compact").tag(VideoRowStyle.compact) Text("viewOptions.rowSize.compact").tag(VideoRowStyle.compact)
Text("viewOptions.rowSize.regular").tag(VideoRowStyle.regular) Text("viewOptions.rowSize.regular").tag(VideoRowStyle.regular)
Text("viewOptions.rowSize.large").tag(VideoRowStyle.large) Text("viewOptions.rowSize.large").tag(VideoRowStyle.large)
@@ -160,7 +160,7 @@ struct ManageChannelsView: View {
#endif #endif
} }
Picker("manageChannels.sortBy", selection: $sortOrder) { PlatformMenuPicker(String(localized: "manageChannels.sortBy"), selection: $sortOrder) {
Text("manageChannels.sortBy.name").tag(SidebarChannelSort.alphabetical) Text("manageChannels.sortBy.name").tag(SidebarChannelSort.alphabetical)
Text("manageChannels.sortBy.recentlySubscribed").tag(SidebarChannelSort.recentlySubscribed) Text("manageChannels.sortBy.recentlySubscribed").tag(SidebarChannelSort.recentlySubscribed)
Text("manageChannels.sortBy.lastUploaded").tag(SidebarChannelSort.lastUploaded) Text("manageChannels.sortBy.lastUploaded").tag(SidebarChannelSort.lastUploaded)

View File

@@ -284,7 +284,7 @@ struct SubscriptionsView: View {
// List-specific options // List-specific options
if layout == .list { if layout == .list {
Picker("viewOptions.rowSize", selection: $rowStyle) { PlatformMenuPicker(String(localized: "viewOptions.rowSize"), selection: $rowStyle) {
Text("viewOptions.rowSize.compact").tag(VideoRowStyle.compact) Text("viewOptions.rowSize.compact").tag(VideoRowStyle.compact)
Text("viewOptions.rowSize.regular").tag(VideoRowStyle.regular) Text("viewOptions.rowSize.regular").tag(VideoRowStyle.regular)
Text("viewOptions.rowSize.large").tag(VideoRowStyle.large) Text("viewOptions.rowSize.large").tag(VideoRowStyle.large)