Commit 0be955d8 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Show clip labels as soon as there is one letter width

Fixes #1339
parent 0125b74d
Pipeline #140861 passed with stage
in 5 minutes and 57 seconds
......@@ -68,7 +68,7 @@ Rectangle {
property bool forceReloadThumb
property bool forceReloadAudioThumb
property bool isComposition: false
property bool hideClipViews: scrollStart > (clipDuration * timeline.scaleFactor) || scrollStart + scrollView.width < 0 || clipRoot.width < 16
property bool hideClipViews: scrollStart > (clipDuration * timeline.scaleFactor) || scrollStart + scrollView.width < 0 || clipRoot.width < root.minClipWidthForViews
property int slipOffset: boundValue(outPoint - maxDuration + 1, trimmingOffset, inPoint)
property int scrollStart: scrollView.contentX - (clipRoot.modelStart * timeline.scaleFactor)
property int mouseXPos: mouseArea.mouseX
......@@ -883,7 +883,7 @@ Rectangle {
color: clipRoot.selected ? 'darkred' : '#66000000'
width: label.width + (2 * itemBorder.border.width)
height: label.height
visible: clipRoot.width > width / 2
visible: clipRoot.width > root.baseUnit
anchors.left: debugCidRect.visible ? debugCidRect.right : parent.left
anchors.leftMargin: clipRoot.timeremap ? labelRect.height : 0
Text {
......
......@@ -46,7 +46,7 @@ Item {
property double speed: 1.0
property color color: displayRect.color
property color borderColor: 'black'
property bool hideCompoViews
property bool hideCompoViews: scrollStart > (clipDuration * timeline.scaleFactor) || scrollStart + scrollView.width < 0 || width < root.minClipWidthForViews
property int scrollStart: scrollView.contentX - modelStart * timeline.scaleFactor
property int mouseXPos: mouseArea.mouseX
......@@ -60,7 +60,6 @@ Item {
signal trimmedOut(var clip)
onScrollStartChanged: {
compositionRoot.hideCompoViews = compositionRoot.scrollStart > width || compositionRoot.scrollStart + scrollView.width < 0
if (!compositionRoot.hideClipViews && compositionRoot.width > scrollView.width) {
if (effectRow.item && effectRow.item.kfrCanvas) {
effectRow.item.kfrCanvas.requestPaint()
......@@ -413,6 +412,7 @@ Item {
// text background
id: labelRect
color: compositionRoot.aTrack > -1 ? 'yellow' : 'lightgray'
visible: compositionRoot.width > root.baseUnit
width: label.width + 2
height: label.height
Text {
......
......@@ -376,7 +376,8 @@ Rectangle {
}
property int activeTool: ProjectTool.SelectTool
property real baseUnit: Math.max(12, fontMetrics.font.pixelSize)
property int baseUnit: Math.max(12, fontMetrics.font.pixelSize)
property int minClipWidthForViews: 1.5 * baseUnit
property real fontUnit: fontMetrics.font.pointSize
property int collapsedHeight: Math.max(28, baseUnit * 1.8)
property int minHeaderWidth: 6 * collapsedHeight
......
  • I hope that 1 character is'n too much.. ( i'm worried about timeline performaces.. ) Maybe "track compositing" can be switched to a [ performances / quality ]

    ( are sliders available onn the GUI ? something like android/ios left/right selectors )

    With "performances" activated... remove thumbnails on small areas and labels also on small areas... and with high quality... everything displayed without limitations.

    Edited by Davy Bartoloni
  • when everything is starting to freeze... pressing the button optimizes interface for maximum speed.

    slider

    performances:

    labels and thumbnails only on >16 pixel spaces (and NONE setting as track compositing)

    quality:

    labels on every space.. and thumbnails only on >16 spaces (an HIGH QUALITY setting as track compositing)

    Edited by Davy Bartoloni
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