Commit 6af4274d authored by dheideman's avatar dheideman Committed by Jacob Walser

Flight display: Flash record button when recording

parent 667c1e12
...@@ -374,12 +374,22 @@ QGCView { ...@@ -374,12 +374,22 @@ QGCView {
visible: _videoReceiver && _videoReceiver.videoRunning && QGroundControl.settingsManager.videoSettings.showRecControl.rawValue visible: _videoReceiver && _videoReceiver.videoRunning && QGroundControl.settingsManager.videoSettings.showRecControl.rawValue
opacity: 0.75 opacity: 0.75
readonly property string recordBtnBackground: "BackgroundName"
Rectangle { Rectangle {
id: recordBtnBackground
anchors.top: parent.top anchors.top: parent.top
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
width: height width: height
radius: QGroundControl.videoManager && _videoReceiver && _videoReceiver.recording ? 0 : height radius: QGroundControl.videoManager && _videoReceiver && _videoReceiver.recording ? 0 : height
color: "red" color: "red"
SequentialAnimation on visible {
running: QGroundControl.videoManager && QGroundControl.videoManager.videoReceiver && QGroundControl.videoManager.videoReceiver.recording
loops: Animation.Infinite
PropertyAnimation { to: false; duration: 1000 }
PropertyAnimation { to: true; duration: 1000 }
}
} }
QGCColoredImage { QGCColoredImage {
...@@ -389,13 +399,23 @@ QGCView { ...@@ -389,13 +399,23 @@ QGCView {
width: height * 0.625 width: height * 0.625
sourceSize.width: width sourceSize.width: width
source: "/qmlimages/CameraIcon.svg" source: "/qmlimages/CameraIcon.svg"
visible: recordBtnBackground.visible
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
color: "white" color: "white"
} }
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
onClicked: _videoReceiver && _videoReceiver.recording ? _videoReceiver.stopRecording() : _videoReceiver.startRecording() onClicked: {
if (QGroundControl.videoManager && QGroundControl.videoManager.videoReceiver) {
if (QGroundControl.videoManager.videoReceiver.recording) {
QGroundControl.videoManager.videoReceiver.stopRecording()
recordBtnBackground.visible = true
} else {
QGroundControl.videoManager.videoReceiver.startRecording()
}
}
}
} }
} }
......
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