Fix multitrack view with only 1 visible track

related to #600
parent 6ebbaf07
......@@ -51,21 +51,6 @@ Item {
acceptedButtons: Qt.NoButton
anchors.fill: parent
}
SceneToolBar {
id: sceneToolBar
barContainsMouse: sceneToolBar.rightSide ? barOverArea.mouseX >= x - 10 : barOverArea.mouseX < x + width + 10
onBarContainsMouseChanged: {
sceneToolBar.opacity = 1
sceneToolBar.visible = sceneToolBar.barContainsMouse
}
anchors {
right: parent.right
top: parent.top
topMargin: 4
rightMargin: 4
leftMargin: 4
}
}
Item {
id: frame
......@@ -77,8 +62,8 @@ Item {
Repeater {
id: trackSeparators
model: tracks
property int rows: trackSeparators.count < 5 ? 2 : 3
property int columns: trackSeparators.count < 3 ? 1 : trackSeparators.count < 7 ? 2 : 3
property int rows: trackSeparators.count < 2 ? 1 : trackSeparators.count < 5 ? 2 : 3
property int columns: trackSeparators.count < 2 ? 1 : trackSeparators.count < 3 ? 1 : trackSeparators.count < 7 ? 2 : 3
Rectangle {
width: parent.width / trackSeparators.rows
height: parent.height / trackSeparators.columns
......@@ -103,6 +88,21 @@ Item {
}
}
}
SceneToolBar {
id: sceneToolBar
barContainsMouse: sceneToolBar.rightSide ? barOverArea.mouseX >= x - 10 : barOverArea.mouseX < x + width + 10
onBarContainsMouseChanged: {
sceneToolBar.opacity = 1
sceneToolBar.visible = sceneToolBar.barContainsMouse
}
anchors {
right: parent.right
top: parent.top
topMargin: 4
rightMargin: 4
leftMargin: 4
}
}
MonitorRuler {
id: clipMonitorRuler
anchors {
......
......@@ -860,6 +860,9 @@ QStringList TimelineFunctions::enableMultitrackView(const std::shared_ptr<Timeli
switch (count) {
case 0:
switch (videoTracks.size()) {
case 1:
geometry = QStringLiteral("0 0 100% 100%");
break;
case 2:
geometry = QStringLiteral("0 0 50% 100%");
break;
......
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