[vlmc-devel] Timeline: Scroll if a clip is being dragged to the right end of the timeline
Yikai Lu
git at videolan.org
Mon Jul 18 15:40:04 CEST 2016
vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Mon Jul 18 22:18:56 2016 +0900| [403c0a5d6dd02d1b17a57ed7d768096a849d7080] | committer: Yikai Lu
Timeline: Scroll if a clip is being dragged to the right end of the timeline
> https://code.videolan.org/videolan/vlmc/commit/403c0a5d6dd02d1b17a57ed7d768096a849d7080
---
src/Gui/timeline/Track.qml | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/Gui/timeline/Track.qml b/src/Gui/timeline/Track.qml
index 942ff09..f64663a 100644
--- a/src/Gui/timeline/Track.qml
+++ b/src/Gui/timeline/Track.qml
@@ -234,6 +234,15 @@ Item {
}
}
+ // Scroll if needed
+ if ( length < ptof( newX + target.width ) ) {
+ length = ptof( newX + target.width );
+ // Never show the background behind the timeline
+ var newContentX = sView.flickableItem.contentWidth - sView.width;
+ if ( newContentX >= 0 )
+ sView.flickableItem.contentX = newContentX;
+ }
+
target.setPixelPosition( newX );
if ( isCollided ) {
More information about the Vlmc-devel
mailing list