From 38edf75f46699b192e8b43162440572dbc9a4884 Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Mon, 11 Jul 2022 20:01:27 +0200 Subject: [PATCH] Fix settings layout --- Shared/Settings/PlayerSettings.swift | 14 +++++++++++--- Shared/Settings/SettingsView.swift | 4 ++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/Shared/Settings/PlayerSettings.swift b/Shared/Settings/PlayerSettings.swift index 8a59b59a..6f64c818 100644 --- a/Shared/Settings/PlayerSettings.swift +++ b/Shared/Settings/PlayerSettings.swift @@ -118,9 +118,17 @@ struct PlayerSettings: View { } private var systemControlsCommandsPicker: some View { - Picker("System controls buttons", selection: $systemControlsCommands) { - Text("10 seconds forwards/backwards").tag(SystemControlsCommands.seek) - Text("Restart/Play next").tag(SystemControlsCommands.restartAndAdvanceToNext) + func labelText(_ label: String) -> String { + #if os(macOS) + "System controls show buttons for \(label)" + #else + label + #endif + } + + return Picker("System controls buttons", selection: $systemControlsCommands) { + Text(labelText("10 seconds forwards/backwards")).tag(SystemControlsCommands.seek) + Text(labelText("Restart/Play next")).tag(SystemControlsCommands.restartAndAdvanceToNext) } .onChange(of: systemControlsCommands) { _ in player.updateRemoteCommandCenter() diff --git a/Shared/Settings/SettingsView.swift b/Shared/Settings/SettingsView.swift index 1cc0cb8f..e460c37c 100644 --- a/Shared/Settings/SettingsView.swift +++ b/Shared/Settings/SettingsView.swift @@ -218,7 +218,7 @@ struct SettingsView: View { case .browsing: return 390 case .player: - return 390 + return 420 case .history: return 480 case .sponsorBlock: @@ -226,7 +226,7 @@ struct SettingsView: View { case .locations: return 480 case .advanced: - return 320 + return 340 case .help: return 600 }