Commit ed751688 authored by Julius Künzel's avatar Julius Künzel

Expanded track tag width only if >10 audio OR video tracks, not sum of

both >10 #696
parent a3226740
......@@ -266,6 +266,16 @@ Rectangle {
dragProxy.verticalOffset = 0
}
function getAudioTracksCount(){
var audioCount = 0;
for (var i = 0; i < trackHeaderRepeater.count; i++) {
if(trackHeaderRepeater.itemAt(i).isAudio) {
audioCount++;
}
}
return audioCount;
}
function getItemAtPos(tk, posx, isComposition) {
var track = Logic.getTrackById(tk)
var container = track.children[0]
......@@ -340,7 +350,7 @@ Rectangle {
property bool showSubtitles: false
property bool subtitlesLocked: timeline.subtitlesLocked
property bool subtitlesDisabled: timeline.subtitlesDisabled
property int trackTagWidth: fontMetrics.boundingRect("M").width * (trackHeaderRepeater.count < 10 ? 2 : 3)
property int trackTagWidth: fontMetrics.boundingRect("M").width * ((getAudioTracksCount() > 9) || (trackHeaderRepeater.count - getAudioTracksCount() > 9) ? 3 : 2)
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