[vlmc-devel] Timeline: Fix scrolling too fast when a clip is being dragged at a certain position
Yikai Lu
git at videolan.org
Wed Jul 5 18:56:04 CEST 2017
vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Thu Jul 6 00:12:36 2017 +0900| [0f348e91584387530502659d4b4c4489dd8cd9bd] | committer: Yikai Lu
Timeline: Fix scrolling too fast when a clip is being dragged at a certain position
> https://code.videolan.org/videolan/vlmc/commit/0f348e91584387530502659d4b4c4489dd8cd9bd
---
src/Gui/timeline/Clip.qml | 1 +
src/Gui/timeline/Track.qml | 8 ++++----
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/Gui/timeline/Clip.qml b/src/Gui/timeline/Clip.qml
index b95e67d6..af2a544c 100644
--- a/src/Gui/timeline/Clip.qml
+++ b/src/Gui/timeline/Clip.qml
@@ -35,6 +35,7 @@ Rectangle {
property var linkedClips: linkedClipsDict[uuid] // Uuid
property string type
property bool selected: false
+ property alias mouseX: dragArea.mouseX
property var clipInfo
diff --git a/src/Gui/timeline/Track.qml b/src/Gui/timeline/Track.qml
index 6c617c16..f240e0f3 100644
--- a/src/Gui/timeline/Track.qml
+++ b/src/Gui/timeline/Track.qml
@@ -129,10 +129,10 @@ Item {
var newContentX = sView.flickableItem.contentX;
if ( sView.flickableItem.contentX + sView.width <
- target.x + target.width + initPosOfCursor + sView.sViewPadding )
- newContentX = target.x + target.width + initPosOfCursor + sView.sViewPadding - sView.width;
- else if ( sView.flickableItem.contentX + sView.sViewPadding > target.x )
- newContentX = target.x - sView.sViewPadding;
+ target.x + target.mouseX + initPosOfCursor + sView.sViewPadding )
+ newContentX = target.x + target.mouseX + initPosOfCursor + sView.sViewPadding - sView.width;
+ else if ( sView.flickableItem.contentX + sView.sViewPadding > target.x + target.mouseX )
+ newContentX = target.x + target.mouseX - sView.sViewPadding;
sView.flickableItem.contentX = Math.max( newContentX, 0 );
}
More information about the Vlmc-devel
mailing list