mirror of
https://github.com/yattee/yattee.git
synced 2026-07-21 06:42:01 +00:00
Refine macOS player controls: add queue, more, previous; drop seek/fullscreen buttons
Add Queue (list.bullet), More (VideoContextMenuView ellipsis), and Play Previous buttons to the macOS control bar. Play Previous is shown always and disabled when the queue has no previous item. Remove the skip-back/forward 10s buttons and the fullscreen button from the bar (arrow-key seek and F-key fullscreen shortcuts are retained). Queue reuses the existing cross-platform queue sheet; More reuses the shared VideoContextMenuView (already !os(tvOS)), styled borderless to match the flat bar buttons.
This commit is contained in:
@@ -904,6 +904,9 @@ extension ExpandedPlayerSheet {
|
||||
onPlayNext: {
|
||||
await playerService.playNext()
|
||||
},
|
||||
onPlayPrevious: {
|
||||
await playerService.playPrevious()
|
||||
},
|
||||
onVolumeChanged: { [weak appEnvironment] volume in
|
||||
playerService.currentBackend?.volume = volume
|
||||
appEnvironment?.settingsManager.playerVolume = volume
|
||||
@@ -917,6 +920,9 @@ extension ExpandedPlayerSheet {
|
||||
},
|
||||
onShowSettings: { [self] in
|
||||
showingQualitySheet = true
|
||||
},
|
||||
onShowQueue: { [self] in
|
||||
showingQueueSheet = true
|
||||
}
|
||||
)
|
||||
.frame(width: controlsWidth, height: controlsHeight)
|
||||
@@ -1160,6 +1166,9 @@ extension ExpandedPlayerSheet {
|
||||
onPlayNext: {
|
||||
await playerService.playNext()
|
||||
},
|
||||
onPlayPrevious: {
|
||||
await playerService.playPrevious()
|
||||
},
|
||||
onVolumeChanged: { [weak appEnvironment] volume in
|
||||
playerService.currentBackend?.volume = volume
|
||||
appEnvironment?.settingsManager.playerVolume = volume
|
||||
@@ -1173,6 +1182,9 @@ extension ExpandedPlayerSheet {
|
||||
},
|
||||
onShowSettings: { [self] in
|
||||
showingQualitySheet = true
|
||||
},
|
||||
onShowQueue: { [self] in
|
||||
showingQueueSheet = true
|
||||
}
|
||||
)
|
||||
.frame(width: controlsWidth, height: controlsHeight)
|
||||
@@ -1560,6 +1572,9 @@ extension ExpandedPlayerSheet {
|
||||
onPlayNext: {
|
||||
await playerService.playNext()
|
||||
},
|
||||
onPlayPrevious: {
|
||||
await playerService.playPrevious()
|
||||
},
|
||||
onVolumeChanged: { [weak appEnvironment] volume in
|
||||
playerService.currentBackend?.volume = volume
|
||||
appEnvironment?.settingsManager.playerVolume = volume
|
||||
@@ -1573,6 +1588,9 @@ extension ExpandedPlayerSheet {
|
||||
},
|
||||
onShowSettings: { [self] in
|
||||
showingQualitySheet = true
|
||||
},
|
||||
onShowQueue: { [self] in
|
||||
showingQueueSheet = true
|
||||
}
|
||||
)
|
||||
.frame(width: availableWidth, height: availableHeight)
|
||||
|
||||
Reference in New Issue
Block a user