diff options
| -rw-r--r-- | bar/Mpris.qml | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/bar/Mpris.qml b/bar/Mpris.qml index b213721..062b89c 100644 --- a/bar/Mpris.qml +++ b/bar/Mpris.qml @@ -67,21 +67,23 @@ Item { } } - onMoved: { - if (Math.round(root.activePlayer.position) !== Math.round(value)) { - root.activePlayer.position = value; - } - } + // onMoved: { + // if (Math.round(root.activePlayer.position) !== Math.round(value)) { + // root.activePlayer.position = value; + // } + // } MouseArea { anchors.fill: parent - acceptedButtons: Qt.MiddleButton | Qt.RightButton + acceptedButtons: Qt.MiddleButton | Qt.RightButton | Qt.LeftButton onClicked: mouse => { - if (mouse.button === Qt.MiddleButton) { + if (mouse.button === Qt.MiddleButton) root.activePlayer?.togglePlaying(); - } else if (mouse.button === Qt.RightButton) { + else if (mouse.button === Qt.RightButton) root.activePlayer?.next(); - } + } + onWheel: mouse => { + root.activePlayer?.seek(-mouse.angleDelta.y / 25); } } } |
