Merge pull request #632 from lonerOrz/fix/mediaCard

fix: Media player auto-switching in Control Center
This commit is contained in:
Lysec
2025-10-31 19:39:29 +01:00
committed by GitHub
3 changed files with 26 additions and 2 deletions
+1 -2
View File
@@ -179,8 +179,7 @@ NBox {
onTriggered: function (action) {
var index = parseInt(action)
if (!isNaN(index)) {
MediaService.selectedPlayerIndex = index
MediaService.updateCurrentPlayer()
MediaService.switchToPlayer(index)
}
}
}
@@ -63,6 +63,14 @@ NPanel {
readonly property int weatherHeight: Math.round(190 * Style.uiScaleRatio)
readonly property int mediaSysMonHeight: Math.round(260 * Style.uiScaleRatio)
onOpened: {
MediaService.autoSwitchingPaused = true
}
onClosed: {
MediaService.autoSwitchingPaused = false
}
panelContent: Item {
id: content