From ac4080a1375db947623779bf50e1b57c4f3c8bda Mon Sep 17 00:00:00 2001 From: Jacob Walser Date: Wed, 4 Jan 2017 01:07:29 -0500 Subject: [PATCH] Add vertical separator for video recording button --- src/VideoStreaming/VideoReceiver.cc | 2 +- src/ui/toolbar/MainToolBarIndicators.qml | 53 ++++++++++++++---------- 2 files changed, 32 insertions(+), 23 deletions(-) diff --git a/src/VideoStreaming/VideoReceiver.cc b/src/VideoStreaming/VideoReceiver.cc index 64202b8523..e382d8ed32 100644 --- a/src/VideoStreaming/VideoReceiver.cc +++ b/src/VideoStreaming/VideoReceiver.cc @@ -70,7 +70,7 @@ GstPadProbeReturn VideoReceiver::_unlinkCB(GstPad* pad, GstPadProbeInfo* info, g return GST_PAD_PROBE_OK; // Also unlinks and unrefs - gst_bin_remove_many(GST_BIN (_pipeline), _sink->queue, _sink->mux, _sink->filesink, NULL); + gst_bin_remove_many(GST_BIN(_pipeline), _sink->queue, _sink->mux, _sink->filesink, NULL); // Give tee its pad back gst_element_release_request_pad(_tee, _sink->teepad); diff --git a/src/ui/toolbar/MainToolBarIndicators.qml b/src/ui/toolbar/MainToolBarIndicators.qml index 46b8940f90..d6d700294e 100644 --- a/src/ui/toolbar/MainToolBarIndicators.qml +++ b/src/ui/toolbar/MainToolBarIndicators.qml @@ -489,28 +489,6 @@ Item { } } - //------------------------------------------------------------------------- - //-- Video Recording - Item { - anchors.top: parent.top - anchors.bottom: parent.bottom - width: height - visible: QGroundControl.videoManager.videoRunning - - Rectangle { - anchors.top: parent.top - anchors.bottom: parent.bottom - width: height - radius: QGroundControl.videoManager.videoReceiver.recording ? 0 : height - color: colorRed - } - - MouseArea { - anchors.fill: parent - onClicked: QGroundControl.videoManager.videoReceiver.recording? QGroundControl.videoManager.videoReceiver.stopRecording() : QGroundControl.videoManager.videoReceiver.startRecording() - } - } - //------------------------------------------------------------------------- //-- Mode Selector QGCLabel { @@ -563,6 +541,37 @@ Item { onClicked: flightModesMenu.popup() } } // QGCLabel - Flight mode selector + + Rectangle { +// anchors.margins: ScreenTools.defaultFontPixelHeight / 2 + anchors.top: parent.top + anchors.bottom: parent.bottom + width: 1 + color: qgcPal.text + visible: QGroundControl.videoManager.videoRunning + } + + //------------------------------------------------------------------------- + //-- Video Recording + Item { + anchors.top: parent.top + anchors.bottom: parent.bottom + width: height + visible: QGroundControl.videoManager.videoRunning + + Rectangle { + anchors.top: parent.top + anchors.bottom: parent.bottom + width: height + radius: QGroundControl.videoManager.videoReceiver.recording ? 0 : height + color: colorRed + } + + MouseArea { + anchors.fill: parent + onClicked: QGroundControl.videoManager.videoReceiver.recording? QGroundControl.videoManager.videoReceiver.stopRecording() : QGroundControl.videoManager.videoReceiver.startRecording() + } + } } // Row - Vehicle indicators Image { -- GitLab