diff options
author | Alexandre Moreno <alexmorenocano@gmail.com> | 2015-11-01 11:24:31 +0800 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2015-11-01 11:23:09 +0200 |
commit | 48bd41e5018d9bbd7d3fb65603821d7828b1d9e6 (patch) | |
tree | 88d9c1056c44b375c722f7c0d9b63ad4623707b7 | |
parent | 2a7fb1110de08ce99bcc88451ed0f07b44f7e08c (diff) |
qt: seek while dragging seek bar
removed time label on top the seek bar, should be placed elsewhere
-rw-r--r-- | qt/main.qml | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/qt/main.qml b/qt/main.qml index 8e56328..322bd01 100644 --- a/qt/main.qml +++ b/qt/main.qml @@ -644,9 +644,14 @@ ApplicationWindow { maximumValue: player.duration value: player.position onPressedChanged: player.seek(value) + onValueChanged: { + if (pressed) + player.seek(value) + } enabled: player.mediaInfo.seekable anchors.bottom: parent.bottom anchors.horizontalCenter: parent.horizontalCenter + updateValueWhileDragging: true MouseArea { id: sliderMouseArea @@ -662,27 +667,6 @@ ApplicationWindow { onPressAndHold: mouse.accepted = false; } - Rectangle { - id: hoveredcliptime - width: 40 - height: 17 - color: "lightgray" - anchors.verticalCenter: parent.verticalCenter - visible: sliderMouseArea.containsMouse - x: sliderMouseArea.mouseX - - Text { - font.pixelSize: 13 - color: "black" - anchors.centerIn: parent - text: { - var value = (sliderMouseArea.mouseX - slider.x) * player.duration / (slider.width - slider.x) - var date = new Date(Math.floor(value / 1e6)); - date.getMinutes() + ":" + ('0' + date.getSeconds()).slice(-2) - } - } - } - style: SliderStyle { groove: Item { implicitWidth: playbar.width |