Commit 842ebb45 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Don't show clip thumbs on when clip is too small (<16 pixels).

Related to #439
parent 2b9fad69
Pipeline #140192 passed with stage
in 7 minutes and 18 seconds
......@@ -68,7 +68,7 @@ Rectangle {
property bool forceReloadThumb
property bool forceReloadAudioThumb
property bool isComposition: false
property bool hideClipViews: false
property bool hideClipViews: scrollStart > (clipDuration * timeline.scaleFactor) || scrollStart + scrollView.width < 0 || clipRoot.width < 16
property int slipOffset: boundValue(outPoint - maxDuration + 1, trimmingOffset, inPoint)
property int scrollStart: scrollView.contentX - (clipRoot.modelStart * timeline.scaleFactor)
property int mouseXPos: mouseArea.mouseX
......@@ -82,7 +82,6 @@ Rectangle {
signal trimmedOut(var clip, bool shiftTrim, bool controlTrim)
onScrollStartChanged: {
clipRoot.hideClipViews = scrollStart > (clipDuration * timeline.scaleFactor) || scrollStart + scrollView.width < 0
if (!clipRoot.hideClipViews && clipRoot.width > scrollView.width) {
if (effectRow.item && effectRow.item.kfrCanvas) {
effectRow.item.kfrCanvas.requestPaint()
......@@ -374,7 +373,7 @@ Rectangle {
//clip: true
asynchronous: true
visible: status == Loader.Ready
source: clipRoot.hideClipViews || clipRoot.itemType == 0 || clipRoot.itemType === ProducerType.Color ? "" : parentTrack.isAudio ? (timeline.showAudioThumbnails ? "ClipAudioThumbs.qml" : "") : timeline.showThumbnails ? "ClipThumbs.qml" : ""
source: (clipRoot.hideClipViews || clipRoot.itemType == 0 || clipRoot.itemType === ProducerType.Color) ? "" : parentTrack.isAudio ? (timeline.showAudioThumbnails ? "ClipAudioThumbs.qml" : "") : timeline.showThumbnails ? "ClipThumbs.qml" : ""
}
Rectangle {
......
......@@ -30,7 +30,8 @@ Row {
// container.width / thumbRow.thumbWidth will display all frames showThumbnails
// 1: only show first thumbnail
// 0: will disable thumbnails
model: parentTrack.trackThumbsFormat === 0 ? 2 : parentTrack.trackThumbsFormat === 1 ? Math.ceil(container.width / thumbRow.thumbWidth) : parentTrack.trackThumbsFormat === 2 ? 1 : 0
// Track trackThumbsFormat is: 2 = In frame only, 0 = in/out, 1 = All frames, 3 = No thumbs
model: parentTrack.trackThumbsFormat === 0 ? (container.width > thumbRow.thumbWidth ? 2 : 1) : parentTrack.trackThumbsFormat === 1 ? Math.ceil(container.width / thumbRow.thumbWidth) : parentTrack.trackThumbsFormat === 2 ? 1 : 0
property int startFrame: clipRoot.inPoint
property int endFrame: clipRoot.outPoint
property real imageWidth: Math.max(thumbRow.thumbWidth, container.width / thumbRepeater.count)
......
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