Commit dc8661ee authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle

Fix composition tooltips

parent 5a0d2e00
......@@ -242,6 +242,22 @@ Item {
masterObject: compositionRoot
kfrModel: compositionRoot.hideCompoViews ? 0 : compositionRoot.keyframeModel
}
ToolTip {
visible: mouseArea.containsMouse && !trimInMouseArea.containsMouse && !trimOutMouseArea.containsMouse && !trimInMouseArea.drag.active && !trimOutMouseArea.drag.active
delay: 1000
timeout: 5000
background: Rectangle {
color: activePalette.alternateBase
border.color: activePalette.light
}
contentItem: Label {
color: activePalette.text
font: miniFont
text: '%1\n%4: %5'.arg(label.text)
.arg(i18n("Duration"))
.arg(timeline.simplifiedTC(compositionRoot.clipDuration))
}
}
}
/*Drag.active: mouseArea.drag.active
Drag.proposedAction: Qt.MoveAction*/
......
......@@ -372,11 +372,11 @@ Item{
clip.lastValidDuration = newDuration
clip.originalX = clip.draggedX
// Show amount trimmed as a time in a "bubble" help.
var delta = newDuration - clip.originalDuration
var delta = clip.originalDuration - new_duration
var s = timeline.simplifiedTC(Math.abs(delta))
s = '%1%2 = %3'.arg((delta <= 0)? '+' : '-')
.arg(s)
.arg(timeline.simplifiedTC(clipDuration))
.arg(timeline.simplifiedTC(new_duration))
bubbleHelp.show(clip.x + clip.width, trackRoot.y + trackRoot.height, s)
}
}
......@@ -390,11 +390,11 @@ Item{
if (new_duration > 0) {
clip.lastValidDuration = newDuration
// Show amount trimmed as a time in a "bubble" help.
var delta = newDuration - clip.originalDuration
var delta = clip.originalDuration - new_duration
var s = timeline.simplifiedTC(Math.abs(delta))
s = '%1%2 = %3'.arg((delta <= 0)? '+' : '-')
.arg(s)
.arg(timeline.simplifiedTC(clipDuration))
.arg(timeline.simplifiedTC(new_duration))
bubbleHelp.show(clip.x + clip.width, trackRoot.y + trackRoot.height, s)
}
}
......
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