Adjust composition height to lower track

parent 4f377c43
Pipeline #14554 passed with stage
in 14 minutes and 44 seconds
......@@ -201,7 +201,7 @@ Item {
anchors.right: compositionRoot.right
anchors.left: compositionRoot.left
anchors.topMargin: displayHeight * 1.2
height: displayHeight * 1.3
height: parentTrack.height - displayHeight * 1.2 + Logic.getTrackHeightByPos(Logic.getTrackIndexFromId(parentTrack.trackInternalId) + 1) / 3
color: selected ? 'mediumpurple' : Qt.darker('mediumpurple')
border.color: selected ? root.selectionColor : grouped ? root.groupColor : borderColor
border.width: isGrabbed ? 8 : 1.5
......
......@@ -79,6 +79,13 @@ function getTrackById(id) {
return 0
}
function getTrackHeightByPos(pos) {
if (pos >= 0 && pos < tracksRepeater.count) {
return tracksRepeater.itemAt(pos).height
}
return 0
}
function getTrackYFromMltIndex(id) {
if (id <= 0) {
return 0
......
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