Commit 078070c0 authored by Julius Künzel's avatar Julius Künzel
Browse files

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

both >10 #696

(cherry picked from commit ed751688)
parent ace08d61
Pipeline #51366 passed with stage
in 10 minutes and 17 seconds
......@@ -291,6 +291,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]
......@@ -366,7 +376,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)
property bool scrollVertically: timeline.scrollVertically
onSeekingFinishedChanged : {
......
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