diff --git a/Shared/Defaults.swift b/Shared/Defaults.swift index 7492ef86..818e2b2d 100644 --- a/Shared/Defaults.swift +++ b/Shared/Defaults.swift @@ -148,14 +148,7 @@ extension Defaults.Keys { static let playerControlsPlaybackModeEnabled = Key("playerControlsPlaybackModeEnabled", default: false) static let playerControlsMusicModeEnabled = Key("playerControlsMusicModeEnabled", default: false) - // TODO: IMPLEMENT THIS - // ** rgdfo;fgks iojsiojf - #if os(macOS) - static let playerDetailsPageButtonLabelStyleDefault = ButtonLabelStyle.iconAndText - #else - static let playerDetailsPageButtonLabelStyleDefault = UIDevice.current.userInterfaceIdiom == .phone ? ButtonLabelStyle.iconOnly : .iconAndText - #endif - static let playerActionsButtonLabelStyle = Key("playerActionsButtonLabelStyle", default: playerDetailsPageButtonLabelStyleDefault) + static let playerActionsButtonLabelStyle = Key("playerActionsButtonLabelStyle", default: .iconAndText) static let actionButtonShareEnabled = Key("actionButtonShareEnabled", default: true) static let actionButtonAddToPlaylistEnabled = Key("actionButtonAddToPlaylistEnabled", default: true) @@ -438,6 +431,15 @@ enum ButtonLabelStyle: String, CaseIterable, Defaults.Serializable { var text: Bool { self == .iconAndText } + + var description: String { + switch self { + case .iconOnly: + "Icon only" + case .iconAndText: + "Icon and text" + } + } } enum ThumbnailsQuality: String, CaseIterable, Defaults.Serializable { diff --git a/Shared/Settings/PlayerControlsSettings.swift b/Shared/Settings/PlayerControlsSettings.swift index c28f449a..9fb421a3 100644 --- a/Shared/Settings/PlayerControlsSettings.swift +++ b/Shared/Settings/PlayerControlsSettings.swift @@ -15,6 +15,7 @@ struct PlayerControlsSettings: View { @Default(.gestureBackwardSeekDuration) private var gestureBackwardSeekDuration @Default(.gestureForwardSeekDuration) private var gestureForwardSeekDuration @Default(.systemControlsSeekDuration) private var systemControlsSeekDuration + @Default(.playerActionsButtonLabelStyle) private var playerActionsButtonLabelStyle @Default(.actionButtonShareEnabled) private var actionButtonShareEnabled @Default(.actionButtonSubscribeEnabled) private var actionButtonSubscribeEnabled @Default(.actionButtonCloseEnabled) private var actionButtonCloseEnabled @@ -117,6 +118,15 @@ struct PlayerControlsSettings: View { Section(header: SettingsHeader(text: "Actions Buttons".localized())) { actionButtonToggles } + + Section { + Picker("Action button labels", selection: $playerActionsButtonLabelStyle) { + ForEach(ButtonLabelStyle.allCases, id: \.rawValue) { style in + Text(style.description).tag(style) + } + } + .modifier(SettingsPickerModifier()) + } } private var systemControlsCommandsPicker: some View { diff --git a/Shared/Settings/SettingsView.swift b/Shared/Settings/SettingsView.swift index d226b725..11410c70 100644 --- a/Shared/Settings/SettingsView.swift +++ b/Shared/Settings/SettingsView.swift @@ -307,7 +307,7 @@ struct SettingsView: View { case .browsing: return 800 case .player: - return 500 + return 550 case .controls: return 920 case .quality: