Move track audio rec controls above track name

parent 1503a631
......@@ -7,6 +7,7 @@ Item {
property int trackId: -1
property int recState: audiorec.recordState
width: parent.width
implicitHeight: root.baseUnit * 1.5
onRecStateChanged: {
if (recState == 1) {
......@@ -51,8 +52,8 @@ Item {
}
Rectangle {
id: levelsContainer
Layout.fillHeight: true
width: recContainer.width - recbutton.width - 6
height: recbutton.height
border.color: root.frameColor
color: Qt.lighter(activePalette.base)
Repeater {
......
......@@ -336,6 +336,19 @@ Rectangle {
}
Layout.rightMargin: 4
}
RowLayout {
id: recLayout
Layout.maximumHeight: showAudioRecord ? -1 : 0
Loader {
id: audioVuMeter
Layout.fillWidth: true
Layout.rightMargin: 2
Layout.leftMargin: 4
visible: showAudioRecord && (trackHeadRoot.height >= 2 * muteButton.height + resizer.height)
source: isAudio && showAudioRecord ? "AudioLevels.qml" : ""
onLoaded: item.trackId = trackId
}
}
RowLayout {
Rectangle {
id: trackLabel
......@@ -344,7 +357,7 @@ Rectangle {
radius: 2
border.color: trackNameMouseArea.containsMouse ? activePalette.highlight : 'transparent'
height: nameEdit.height
visible: (trackHeadRoot.height >= trackLabel.height + muteButton.height + resizer.height)
visible: (trackHeadRoot.height >= trackLabel.height + muteButton.height + resizer.height + recLayout.height)
MouseArea {
id: trackNameMouseArea
anchors.fill: parent
......@@ -410,19 +423,6 @@ Rectangle {
}
}
}
RowLayout {
Loader {
id: audioVuMeter
Layout.fillWidth: true
Layout.fillHeight: true
Layout.rightMargin: 2
Layout.leftMargin: 4
Layout.minimumHeight: root.baseUnit
Layout.maximumHeight: root.baseUnit * 3
source: isAudio && showAudioRecord ? "AudioLevels.qml" : ""
onLoaded: item.trackId = trackId
}
}
Item {
// Spacer
id: spacer
......
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