Commit 06047a8c authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Fix fades handles sometimes not appearing

Make clip resize handles slightly larger
parent a076cc4d
Pipeline #9065 passed with stage
in 16 minutes and 53 seconds
...@@ -614,7 +614,8 @@ Rectangle { ...@@ -614,7 +614,8 @@ Rectangle {
} }
Rectangle { Rectangle {
id: fadeInControl id: fadeInControl
anchors.horizontalCenter: fadeInTriangle.width > radius? fadeInTriangle.right : undefined anchors.left: fadeInTriangle.right
anchors.leftMargin: fadeInTriangle.width > root.baseUnit ? -root.baseUnit : 0
anchors.top: fadeInTriangle.top anchors.top: fadeInTriangle.top
anchors.topMargin: -10 anchors.topMargin: -10
width: root.baseUnit * 2 width: root.baseUnit * 2
...@@ -650,7 +651,6 @@ Rectangle { ...@@ -650,7 +651,6 @@ Rectangle {
startX = Math.round(parent.x / timeScale) startX = Math.round(parent.x / timeScale)
startFadeIn = clipRoot.fadeIn startFadeIn = clipRoot.fadeIn
parent.anchors.left = undefined parent.anchors.left = undefined
parent.anchors.horizontalCenter = undefined
parent.opacity = 1 parent.opacity = 1
fadeInTriangle.opacity = 0.5 fadeInTriangle.opacity = 0.5
// parentTrack.clipSelected(clipRoot, parentTrack) TODO // parentTrack.clipSelected(clipRoot, parentTrack) TODO
...@@ -659,10 +659,7 @@ Rectangle { ...@@ -659,10 +659,7 @@ Rectangle {
root.autoScrolling = timeline.autoScroll root.autoScrolling = timeline.autoScroll
fadeInTriangle.opacity = 0.3 fadeInTriangle.opacity = 0.3
parent.opacity = 0 parent.opacity = 0
if (fadeInTriangle.width > parent.radius) parent.anchors.left = fadeInTriangle.right
parent.anchors.horizontalCenter = fadeInTriangle.right
else
parent.anchors.left = fadeInTriangle.left
console.log('released fade: ', clipRoot.fadeIn) console.log('released fade: ', clipRoot.fadeIn)
timeline.adjustFade(clipRoot.clipId, 'fadein', clipRoot.fadeIn, startFadeIn) timeline.adjustFade(clipRoot.clipId, 'fadein', clipRoot.fadeIn, startFadeIn)
bubbleHelp.hide() bubbleHelp.hide()
...@@ -712,7 +709,8 @@ Rectangle { ...@@ -712,7 +709,8 @@ Rectangle {
} }
Rectangle { Rectangle {
id: fadeOutControl id: fadeOutControl
anchors.horizontalCenter: fadeOutCanvas.width > radius? fadeOutCanvas.left : undefined anchors.right: fadeOutCanvas.left
anchors.rightMargin: fadeOutCanvas.width > root.baseUnit ? -root.baseUnit : 0
anchors.top: fadeOutCanvas.top anchors.top: fadeOutCanvas.top
anchors.topMargin: -10 anchors.topMargin: -10
width: root.baseUnit * 2 width: root.baseUnit * 2
...@@ -748,7 +746,6 @@ Rectangle { ...@@ -748,7 +746,6 @@ Rectangle {
startX = Math.round(parent.x / timeScale) startX = Math.round(parent.x / timeScale)
startFadeOut = clipRoot.fadeOut startFadeOut = clipRoot.fadeOut
parent.anchors.right = undefined parent.anchors.right = undefined
parent.anchors.horizontalCenter = undefined
parent.opacity = 1 parent.opacity = 1
fadeOutCanvas.opacity = 0.5 fadeOutCanvas.opacity = 0.5
} }
...@@ -756,10 +753,7 @@ Rectangle { ...@@ -756,10 +753,7 @@ Rectangle {
fadeOutCanvas.opacity = 0.3 fadeOutCanvas.opacity = 0.3
parent.opacity = 0 parent.opacity = 0
root.autoScrolling = timeline.autoScroll root.autoScrolling = timeline.autoScroll
if (fadeOutCanvas.width > parent.radius) parent.anchors.right = fadeOutCanvas.left
parent.anchors.horizontalCenter = fadeOutCanvas.left
else
parent.anchors.right = fadeOutCanvas.right
var duration = clipRoot.fadeOut var duration = clipRoot.fadeOut
if (duration > 0) { if (duration > 0) {
duration += 1 duration += 1
...@@ -806,7 +800,7 @@ Rectangle { ...@@ -806,7 +800,7 @@ Rectangle {
anchors.leftMargin: 0 anchors.leftMargin: 0
height: parent.height height: parent.height
enabled: !isLocked enabled: !isLocked
width: root.baseUnit / 3 width: root.baseUnit / 2
color: isAudio? 'green' : 'lawngreen' color: isAudio? 'green' : 'lawngreen'
opacity: 0 opacity: 0
Drag.active: trimInMouseArea.drag.active Drag.active: trimInMouseArea.drag.active
...@@ -887,7 +881,7 @@ Rectangle { ...@@ -887,7 +881,7 @@ Rectangle {
anchors.right: clipRoot.right anchors.right: clipRoot.right
anchors.rightMargin: 0 anchors.rightMargin: 0
height: parent.height height: parent.height
width: root.baseUnit / 3 width: root.baseUnit / 2
color: 'red' color: 'red'
opacity: 0 opacity: 0
enabled: !isLocked enabled: !isLocked
......
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