Fix settings layout

This commit is contained in:
Arkadiusz Fal 2022-07-11 20:01:27 +02:00
parent e41644974c
commit 38edf75f46
2 changed files with 13 additions and 5 deletions

View File

@ -118,9 +118,17 @@ struct PlayerSettings: View {
} }
private var systemControlsCommandsPicker: some View { private var systemControlsCommandsPicker: some View {
Picker("System controls buttons", selection: $systemControlsCommands) { func labelText(_ label: String) -> String {
Text("10 seconds forwards/backwards").tag(SystemControlsCommands.seek) #if os(macOS)
Text("Restart/Play next").tag(SystemControlsCommands.restartAndAdvanceToNext) "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 .onChange(of: systemControlsCommands) { _ in
player.updateRemoteCommandCenter() player.updateRemoteCommandCenter()

View File

@ -218,7 +218,7 @@ struct SettingsView: View {
case .browsing: case .browsing:
return 390 return 390
case .player: case .player:
return 390 return 420
case .history: case .history:
return 480 return 480
case .sponsorBlock: case .sponsorBlock:
@ -226,7 +226,7 @@ struct SettingsView: View {
case .locations: case .locations:
return 480 return 480
case .advanced: case .advanced:
return 320 return 340
case .help: case .help:
return 600 return 600
} }