Update PlayerControl.qml changed progress into a scrubber

This commit is contained in:
2026-06-22 00:03:13 -04:00
parent 2d9c455e1e
commit fa01d709c5
+14 -2
View File
@@ -188,10 +188,11 @@ Item {
elide: Text.ElideRight
text: playerController.player?.trackArtist
}
Rectangle {
id: scrubber
Layout.fillWidth: true
Layout.preferredHeight: 4
Layout.preferredHeight: 8
Layout.rightMargin: 8
color: blendedColors.colLayer1
visible: playerController.player?.length > 0
@@ -203,6 +204,17 @@ Item {
width: (playerController.player?.position / playerController.player?.length) * parent.width
radius: parent.height / 2
}
MouseArea {
id: scrubberInteract
anchors.fill: parent
onClicked: {
if (playerController.player) {
var pos = (mouseX / parent.width) * playerController.player.length
playerController.player.position = pos
}
}
}
}
RowLayout {
Layout.fillWidth: true