Improve snapping, don't allow resize on lower zoom levels

parent 4acfecb0
Pipeline #14380 passed with stage
in 23 minutes and 53 seconds
......@@ -367,7 +367,7 @@ Rectangle {
x: -clipRoot.border.width
height: parent.height
width: root.baseUnit / 2
enabled: !isLocked
enabled: !isLocked && (pressed || clipRoot.width > 3 * width)
hoverEnabled: true
drag.target: trimInMouseArea
drag.axis: Drag.XAxis
......@@ -427,7 +427,7 @@ Rectangle {
opacity: 0
Drag.active: trimInMouseArea.drag.active
Drag.proposedAction: Qt.MoveAction
visible: trimInMouseArea.pressed || (root.activeTool === 0 && !mouseArea.drag.active && clipRoot.width > 4 * width)
visible: trimInMouseArea.pressed || (root.activeTool === 0 && !mouseArea.drag.active && parent.enabled)
ToolTip {
visible: trimInMouseArea.containsMouse && !trimInMouseArea.pressed
......@@ -455,7 +455,7 @@ Rectangle {
height: parent.height
width: root.baseUnit / 2
hoverEnabled: true
enabled: !isLocked
enabled: !isLocked && (pressed || clipRoot.width > 3 * width)
property bool shiftTrim: false
property bool controlTrim: false
property bool sizeChanged: false
......@@ -524,7 +524,7 @@ Rectangle {
opacity: 0
Drag.active: trimOutMouseArea.drag.active
Drag.proposedAction: Qt.MoveAction
visible: trimOutMouseArea.pressed || (root.activeTool === 0 && !mouseArea.drag.active && clipRoot.width > 4 * width)
visible: trimOutMouseArea.pressed || (root.activeTool === 0 && !mouseArea.drag.active && parent.enabled)
}
}
......
......@@ -247,7 +247,7 @@ Rectangle {
property int spacerFrame: -1
property int spacerClickFrame: -1
property real timeScale: timeline.scaleFactor
property real snapping: (timeline.snap && (timeScale < 2 * baseUnit)) ? 10 / Math.sqrt(timeScale) - 0.5 : -1
property real snapping: (timeline.snap && (timeScale < 2 * baseUnit)) ? baseUnit / (timeScale > 1 ? Math.sqrt(timeScale) : timeScale) : -1
property var timelineSelection: timeline.selection
property int trackHeight
property int copiedClip: -1
......@@ -278,6 +278,7 @@ Rectangle {
// update dragged item pos
dragProxy.masterObject.updateDrag()
}
console.log('GOT SCALE: ', timeScale, ' - SNAPPING: ', snapping)
}
onConsumerPositionChanged: {
......
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