[AI] Added media control buttons to player control

This commit is contained in:
2026-06-10 19:15:00 -04:00
parent 8db1e8d4a0
commit 0738e33d58

View File

@@ -188,8 +188,53 @@ Item {
elide: Text.ElideRight
text: playerController.player?.trackArtist
}
Item { // spacing
Layout.fillHeight: true
RowLayout {
Layout.fillWidth: true
Layout.preferredHeight: 32
spacing: 8
RippleButton {
implicitWidth: 32
implicitHeight: 32
onClicked: playerController.player?.previous()
contentItem: MaterialSymbol {
text: "skip_previous"
iconSize: 24
anchors.centerIn: parent
color: blendedColors.colOnLayer1
}
}
RippleButton {
id: playPauseButton
implicitWidth: 32
implicitHeight: 32
onClicked: {
if (playerController.player?.playbackState == MprisPlaybackState.Playing) {
playerController.player?.pause()
} else {
playerController.player?.play()
}
}
contentItem: MaterialSymbol {
text: playerController.player?.playbackState == MprisPlaybackState.Playing ? "pause" : "play_arrow"
iconSize: 24
anchors.centerIn: parent
color: blendedColors.colOnLayer1
}
}
RippleButton {
implicitWidth: 32
implicitHeight: 32
onClicked: playerController.player?.next()
contentItem: MaterialSymbol {
text: "skip_next"
iconSize: 24
anchors.centerIn: parent
color: blendedColors.colOnLayer1
}
}
}
}
}