Monitor zoombar: don't hide monitor audio thumb when active

Related to #651
parent 3cb5c32d
Pipeline #25073 passed with stage
in 24 minutes and 49 seconds
......@@ -15,11 +15,12 @@ Rectangle {
width: parent.width
height: 1
}
// Zoom bar container
Rectangle {
id: zoomBackground
height: root.baseUnit
color: activePalette.base
visible: false
visible: root.showZoomBar
onVisibleChanged: {
root.zoomOffset = visible ? height : 0
}
......@@ -246,7 +247,7 @@ Rectangle {
root.zoomFactor = Math.min(1, root.zoomFactor * 1.2)
if (root.zoomFactor == 1) {
root.zoomStart = 0
zoomBackground.visible = false
root.showZoomBar = false
} else {
var middle = root.zoomStart + root.zoomFactor / 2
middle = Math.max(0, middle - root.zoomFactor / 2)
......@@ -257,7 +258,7 @@ Rectangle {
}
} else {
// zoom in
zoomBackground.visible = true
root.showZoomBar = true
var middle = wheel.x / rulerMouseArea.width / 1.2 //root.zoomStart + root.zoomFactor / 2
root.zoomFactor = Math.min(1, root.zoomFactor / 1.2)
var startPos = Math.max(0, middle - root.zoomFactor / 2)
......
......@@ -18,9 +18,11 @@ Item {
property double zoom
property double scalex
property double scaley
// Zoombar properties
property double zoomStart: 0
property double zoomFactor: 1
property int zoomOffset: 0
property bool showZoomBar: false
property bool dropped: false
property string fps: '-'
property bool showMarkers: false
......@@ -136,7 +138,7 @@ Item {
Item {
id: audioThumb
property bool stateVisible: (clipMonitorRuler.containsMouse || thumbMouseArea.containsMouse || thumbTimer.running)
property bool stateVisible: (clipMonitorRuler.containsMouse || thumbMouseArea.containsMouse || thumbTimer.running || root.showZoomBar)
property bool isAudioClip: controller.clipType == ProducerType.Audio
anchors {
left: parent.left
......
......@@ -23,8 +23,11 @@ Item {
property bool showFps: false
property bool showSafezone: false
property bool showAudiothumb: false
// Zoombar properties
property double zoomStart: 0
property double zoomFactor: 1
property int zoomOffset: 0
property bool showZoomBar: false
property real baseUnit: fontMetrics.font.pixelSize * 0.8
property int duration: 300
property int mouseRulerPos: 0
......
......@@ -16,6 +16,11 @@ Item {
property point center
property double scalex
property double scaley
// Zoombar properties
property double zoomStart: 0
property double zoomFactor: 1
property int zoomOffset: 0
property bool showZoomBar: false
property double stretch : 1
property double sourcedar : 1
onScalexChanged: canvas.requestPaint()
......
......@@ -17,6 +17,11 @@ Item {
property point center
property double scalex
property double scaley
// Zoombar properties
property double zoomStart: 0
property double zoomFactor: 1
property int zoomOffset: 0
property bool showZoomBar: false
property double offsetx : 0
property double offsety : 0
property double lockratio : -1
......
......@@ -17,6 +17,11 @@ Item {
property color overlayColor: 'cyan'
property double scalex : 1
property double scaley : 1
// Zoombar properties
property double zoomStart: 0
property double zoomFactor: 1
property int zoomOffset: 0
property bool showZoomBar: false
property double stretch : 1
property double sourcedar : 1
property double offsetx : 0
......
......@@ -23,6 +23,11 @@ Item {
property double offsety
property double scalex
property double scaley
// Zoombar properties
property double zoomStart: 0
property double zoomFactor: 1
property int zoomOffset: 0
property bool showZoomBar: false
signal qmlMoveSplit()
......
......@@ -17,6 +17,11 @@ Item {
property point center
property double scalex
property double scaley
// Zoombar properties
property double zoomStart: 0
property double zoomFactor: 1
property int zoomOffset: 0
property bool showZoomBar: false
property double stretch : 1
property double sourcedar : 1
property double offsetx : 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