Commit 5adf0dcb authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Ensure all track tags have the same width if more than 10 tracks.

Fixes !173
parent 02d09e04
......@@ -101,7 +101,7 @@ Rectangle {
background: Rectangle {
color: trackTarget.bgColor
}
width: 2 * root.trackTagWidth
width: 1.5 * root.baseUnit
height: trackHeadRoot.height
verticalAlignment: Text.AlignTop
horizontalAlignment: Text.AlignHCenter
......@@ -294,7 +294,7 @@ Rectangle {
background: Rectangle {
color: trackLed.bgColor
}
width: root.trackTagWidth * trackHeadRoot.trackTag.length
width: root.trackTagWidth
height: root.collapsedHeight - 2
y: 1
verticalAlignment: Text.AlignVCenter
......
......@@ -340,7 +340,7 @@ Rectangle {
property bool showSubtitles: false
property bool subtitlesLocked: timeline.subtitlesLocked
property bool subtitlesDisabled: timeline.subtitlesDisabled
property int trackTagWidth: fontMetrics.boundingRect("M").width
property int trackTagWidth: fontMetrics.boundingRect("M").width * (trackHeaderRepeater.count < 10 ? 2 : 3)
onSeekingFinishedChanged : {
playhead.opacity = seekingFinished ? 1 : 0.5
......@@ -760,7 +760,7 @@ Rectangle {
focusPolicy: Qt.NoFocus
property var modifier: 0
anchors.left: parent.left
anchors.leftMargin: 2 * root.trackTagWidth
anchors.leftMargin: 1.5 * root.baseUnit
width: root.collapsedHeight
height: root.collapsedHeight
contentItem: Item {
......
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