diff --git a/osd/PlayerControl.qml b/osd/PlayerControl.qml index 8c04ef8..66052a6 100644 --- a/osd/PlayerControl.qml +++ b/osd/PlayerControl.qml @@ -189,7 +189,7 @@ Item { text: playerController.player?.trackArtist } Rectangle { - id: scrubber + id: scrubberOutline Layout.fillWidth: true Layout.preferredHeight: 8 Layout.rightMargin: 8 @@ -197,21 +197,28 @@ Item { visible: playerController.player?.length > 0 Rectangle { - anchors.top: parent.top - anchors.bottom: parent.bottom - anchors.left: parent.left - color: blendedColors.colPrimary - width: (playerController.player?.position / playerController.player?.length) * parent.width - radius: parent.height / 2 - } - - MouseArea { - id: scrubberInteract + id: scrubber anchors.fill: parent - onClicked: { - if (playerController.player) { - var pos = (mouseX / parent.width) * playerController.player.length - playerController.player.position = pos + anchors.margins: 2 + color: blendedColors.colLayer1 + + Rectangle { + anchors.top: parent.top + anchors.bottom: parent.bottom + anchors.left: parent.left + color: blendedColors.colPrimary + 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 + } } } }