Elide timeline markers instead of hiding them on lower zoom.

Related to #760
parent c0959b53
......@@ -365,10 +365,17 @@ Rectangle {
onClicked: proxy.position = (clipRoot.x + markerBase.x) / timeline.scaleFactor
}
}
TextMetrics {
id: textMetrics
font: miniFont
text: model.comment
elide: root.timeScale > 1 ? Text.ElideNone : Text.ElideRight
elideWidth: root.maxLabelWidth
}
Text {
id: mlabel
visible: timeline.showMarkers && parent.width > width * 1.5
text: model.comment
visible: timeline.showMarkers && textMetrics.elideWidth > root.baseUnit
text: textMetrics.elidedText
font: miniFont
x: markerBase.x
anchors {
......
......@@ -305,6 +305,7 @@ Rectangle {
property int scrollMax: scrollMin + scrollView.contentItem.width / timeline.scaleFactor
property double dar: 16/9
property bool paletteUnchanged: true
property int maxLabelWidth: 20 * root.baseUnit * Math.sqrt(root.timeScale)
onSeekingFinishedChanged : {
playhead.opacity = seekingFinished ? 1 : 0.5
......
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