Commit 9d5745a5 authored by luyikei's avatar luyikei

Timeline: Make clips semi-transparent if they are being dragged

parent 58977f30
......@@ -20,6 +20,7 @@ Rectangle {
radius: 2
border.color: "#1f546f"
border.width: 1
opacity: page.dragging === true && selectedClips.indexOf( uuid ) !== -1 ? 0.5 : 1.0
property alias name: text.text
property alias thumbnailSource: thumbnailImage.source
......@@ -322,14 +323,14 @@ Rectangle {
onPressed: {
clip.Drag.hotSpot = Qt.point( mouseX, clip.height / 2 );
if ( selected === true )
return;
if ( !( mouse.modifiers & Qt.ControlModifier ) )
clearSelectedClips();
if ( mouse.button & Qt.LeftButton )
selected = true;
if ( mouse.button & Qt.LeftButton ) {
if ( selected === false ) {
if ( !( mouse.modifiers & Qt.ControlModifier ) )
clearSelectedClips();
selected = true;
}
page.dragging = true;
}
}
onClicked: {
......@@ -343,6 +344,7 @@ Rectangle {
return;
workflow.splitClip( uuid, newClipPos, newClipBegin );
}
page.dragging = false;
}
onReleased: {
......
......@@ -24,6 +24,7 @@ Rectangle {
property var linkedClipsDict: ({}) // Uuid
property alias isMagneticMode: magneticModeButton.selected
property bool isCutMode: false
property bool dragging: false
property int trackHeight: 60
......@@ -325,6 +326,7 @@ Rectangle {
}
function dragFinished() {
dragging = false;
sortSelectedClips();
// We don't want to rely on selectedClips while moving since it "will" be changed
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment