Commit 6bfa9a43 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Drop semi-working clip name offset in timeline

parent 14a15e89
...@@ -81,7 +81,6 @@ Rectangle { ...@@ -81,7 +81,6 @@ Rectangle {
property var groupTrimData property var groupTrimData
property int scrollStart: scrollView.contentX - (clipRoot.modelStart * timeline.scaleFactor) property int scrollStart: scrollView.contentX - (clipRoot.modelStart * timeline.scaleFactor)
property int mouseXPos: mouseArea.mouseX property int mouseXPos: mouseArea.mouseX
property double clipNameOffset: isAudio || parentTrack.trackThumbsFormat > 0 ? clipRoot.border.width : (clipRoot.border.width + (container.height * root.dar * 2)) < container.width ? clipRoot.border.width + container.height * root.dar : clipRoot.border.width
width : clipDuration * timeScale width : clipDuration * timeScale
opacity: dragProxyArea.drag.active && dragProxy.draggedItem == clipId ? 0.8 : 1.0 opacity: dragProxyArea.drag.active && dragProxy.draggedItem == clipId ? 0.8 : 1.0
...@@ -184,10 +183,15 @@ Rectangle { ...@@ -184,10 +183,15 @@ Rectangle {
onTimeScaleChanged: { onTimeScaleChanged: {
x = modelStart * timeScale; x = modelStart * timeScale;
width = clipDuration * timeScale; width = clipDuration * timeScale;
labelRect.x = scrollX > modelStart * timeScale ? scrollX - modelStart * timeScale : clipRoot.clipNameOffset updateLabelOffset()
} }
onScrollXChanged: { onScrollXChanged: {
labelRect.x = scrollX > modelStart * timeScale ? scrollX - modelStart * timeScale : clipRoot.clipNameOffset updateLabelOffset()
}
function updateLabelOffset()
{
labelRect.x = scrollX > modelStart * timeScale ? scrollX - modelStart * timeScale : clipRoot.border.width
} }
border.color: (clipStatus == ClipStatus.StatusMissing || ClipStatus == ClipStatus.StatusWaiting || clipStatus == ClipStatus.StatusDeleting) ? "#ff0000" : selected ? root.selectionColor : grouped ? root.groupColor : borderColor border.color: (clipStatus == ClipStatus.StatusMissing || ClipStatus == ClipStatus.StatusWaiting || clipStatus == ClipStatus.StatusDeleting) ? "#ff0000" : selected ? root.selectionColor : grouped ? root.groupColor : borderColor
...@@ -741,6 +745,7 @@ Rectangle { ...@@ -741,6 +745,7 @@ Rectangle {
// Clip name background // Clip name background
id: labelRect id: labelRect
color: clipRoot.selected ? 'darkred' : '#66000000' color: clipRoot.selected ? 'darkred' : '#66000000'
x: clipRoot.border.width
y: 0 y: 0
width: label.width + 2 * clipRoot.border.width width: label.width + 2 * clipRoot.border.width
height: label.height height: label.height
......
...@@ -12,7 +12,6 @@ Row { ...@@ -12,7 +12,6 @@ Row {
property bool fixedThumbs: clipRoot.itemType == ProducerType.Image || clipRoot.itemType == ProducerType.Text || clipRoot.itemType == ProducerType.TextTemplate property bool fixedThumbs: clipRoot.itemType == ProducerType.Image || clipRoot.itemType == ProducerType.Text || clipRoot.itemType == ProducerType.TextTemplate
property int thumbWidth: container.height * root.dar property int thumbWidth: container.height * root.dar
property bool enableCache: clipRoot.itemType == ProducerType.Video || clipRoot.itemType == ProducerType.AV property bool enableCache: clipRoot.itemType == ProducerType.Video || clipRoot.itemType == ProducerType.AV
function reload(reset) { function reload(reset) {
//console.log('+++++\n\ntriggered ML thumb reload\n\n++++++++++++++') //console.log('+++++\n\ntriggered ML thumb reload\n\n++++++++++++++')
clipRoot.baseThumbPath = clipRoot.variableThumbs ? '' : 'image://thumbnail/' + clipRoot.binId + '/' + Math.random() + '/#' clipRoot.baseThumbPath = clipRoot.variableThumbs ? '' : 'image://thumbnail/' + clipRoot.binId + '/' + Math.random() + '/#'
......
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