Skip to content
Commit cfa820fa 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 4c0f1d9a
Pipeline #49005 passed with stage
in 10 minutes and 56 seconds
  • mentioned in issue #696 (closed)

    Toggle commit list
  • As @vivekkde noticed

    it is counting both audio and video track. Like if their are 2 audio tracks and 8 video tracks it will increase the size as total count is 10.

    Something like this solves it:

        function getAudioTracksCount(){
            var audioCount = 0;
            for (var i = 0; i < trackHeaderRepeater.count; i++) {
                if(trackHeaderRepeater.itemAt(i).isAudio) {
                    audioCount++;
                }
            }
            return audioCount;
        }
    property int trackTagWidth: fontMetrics.boundingRect("M").width * ((getAudioTracksCount() > 9) || (trackHeaderRepeater.count - getAudioTracksCount() > 9)  ? 3 : 2)
    
  • @jlskuz yes, as soon as there are more than 10 tracks are added the label gets enlarged.

    I think the correct term should be:
    if there are more than 10 videoTracks
    or more than 10 audioTracks
    then the label should be enlarged

    Edited by Eugen Mohr
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