Commit 8d31018b authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Show speed in status bar on resize.

Fixes #1085
parent f64067ab
Pipeline #64738 canceled with stage
......@@ -297,10 +297,16 @@ Item{
clip.x += clip.width - (newDuration * trackRoot.timeScale)
clip.width = newDuration * root.timeScale
speedController.x = clip.x + clip.border.width
speedController.width = clip.width - 2 * clip.border.width
speedController.width = Math.max(0, clip.width - 2 * clip.border.width)
speedController.lastValidDuration = newDuration
clip.speed = clip.originalDuration * speedController.originalSpeed / newDuration
speedController.visible = true
var s = timeline.simplifiedTC(Math.abs(delta))
s = '%1:%2, %3:%4'.arg(i18n("Speed"))
.arg(clip.speed)
.arg(i18n("Duration"))
.arg(timeline.simplifiedTC(newDuration))
timeline.showToolTip(s)
return
}
var new_duration = controller.requestItemResize(clip.clipId, newDuration, false, false, root.snapping, shiftTrim)
......@@ -347,10 +353,15 @@ Item{
speedController.x = clip.x + clip.border.width
newDuration = controller.requestItemSpeedChange(clip.clipId, newDuration, true, root.snapping)
clip.width = newDuration * trackRoot.timeScale
speedController.width = clip.width - 2 * clip.border.width
speedController.width = Math.max(0, clip.width - 2 * clip.border.width)
speedController.lastValidDuration = newDuration
clip.speed = clip.originalDuration * speedController.originalSpeed / newDuration
speedController.visible = true
var s = '%1:%2\%, %3:%4'.arg(i18n("Speed"))
.arg(Math.round(clip.speed*100))
.arg(i18n("Duration"))
.arg(timeline.simplifiedTC(newDuration))
timeline.showToolTip(s)
return
}
var new_duration = controller.requestItemResize(clip.clipId, newDuration, true, false, root.snapping, shiftTrim)
......@@ -438,6 +449,7 @@ Item{
anchors.bottom: parent.bottom
color: activePalette.highlight //'#cccc0000'
visible: false
clip: true
height: root.baseUnit * 1.5
property int lastValidDuration: 0
property real originalSpeed: 1
......
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