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