[AI] Added media control buttons to player control
This commit is contained in:
@@ -188,8 +188,53 @@ Item {
|
|||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
text: playerController.player?.trackArtist
|
text: playerController.player?.trackArtist
|
||||||
}
|
}
|
||||||
Item { // spacing
|
RowLayout {
|
||||||
Layout.fillHeight: true
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user