Commit b6a0f25c authored by Gus Grubba's avatar Gus Grubba

Make ToolStrip be at the same Y position on both Fly and Plan view

Make ToolStrip font smaller (Desktop builds)
Check for auto configured video stream before testing video source type
parent 6ab120ac
......@@ -572,8 +572,8 @@ Item {
anchors.left: isInstrumentRight() ? _mapAndVideo.left : undefined
anchors.rightMargin:isInstrumentRight() ? undefined : ScreenTools.defaultFontPixelWidth
anchors.right: isInstrumentRight() ? undefined : _mapAndVideo.right
anchors.topMargin: ScreenTools.toolbarHeight + anchors.leftMargin
anchors.top: _mapAndVideo.top
anchors.topMargin: mainWindow.header.height + (ScreenTools.defaultFontPixelHeight * 0.5)
anchors.top: parent.top
z: _mapAndVideo.z + 4
maxHeight: (_flightVideo.visible ? _flightVideo.y : parent.height) - toolStrip.y
......
......@@ -8,7 +8,7 @@
****************************************************************************/
import QtQuick 2.3
import QtQuick 2.4
import QtQuick.Controls 1.2
import QtLocation 5.3
import QtPositioning 5.3
......@@ -166,7 +166,6 @@ FlightMap {
QGCMapPalette { id: mapPal; lightColors: isSatelliteMap }
Connections {
enabled: missionController !== null
target: missionController
ignoreUnknownSignals: true
onNewItemsFromVehicle: {
......
......@@ -530,12 +530,12 @@ Item {
//-----------------------------------------------------------
// Left tool strip
ToolStrip {
id: toolStrip
id: toolStrip
anchors.leftMargin: ScreenTools.defaultFontPixelWidth * 2
anchors.left: parent.left
anchors.topMargin: _toolButtonTopMargin + anchors.leftMargin
anchors.top: parent.top
z: QGroundControl.zOrderWidgets
anchors.left: parent.left
anchors.topMargin: ScreenTools.defaultFontPixelHeight * 0.5
anchors.top: parent.top
z: QGroundControl.zOrderWidgets
showAlternateIcon: [ false, _planMasterController.dirty, false, false, false, false, false, false ]
rotateImage: [ false, _planMasterController.syncInProgress, false, false, false, false, false, false ]
......
......@@ -36,7 +36,6 @@ Rectangle {
signal clicked(int index, bool checked)
QGCPalette { id: qgcPal }
ButtonGroup {
id: buttonGroup
exclusive: false
......@@ -59,7 +58,7 @@ Rectangle {
anchors.right: toolStripColumn.right
height: width
radius: ScreenTools.defaultFontPixelWidth / 2
fontPointSize: ScreenTools.isMobile ? ScreenTools.smallFontPointSize : ScreenTools.defaultFontPointSize
fontPointSize: ScreenTools.smallFontPointSize
enabled: _root.buttonEnabled ? _root.buttonEnabled[index] : true
visible: _root.buttonVisible ? _root.buttonVisible[index] : true
......
......@@ -130,16 +130,16 @@ bool VideoSettings::streamConfigured(void)
#if !defined(QGC_GST_STREAMING)
return false;
#endif
//-- First, check if it's disabled
QString vSource = videoSource()->rawValue().toString();
if(vSource == videoSourceNoVideo || vSource == videoDisabled) {
return false;
}
//-- Check if it's autoconfigured
//-- First, check if it's autoconfigured
if(qgcApp()->toolbox()->videoManager()->autoStreamConfigured()) {
qCDebug(VideoManagerLog) << "Stream auto configured";
return true;
}
//-- Check if it's disabled
QString vSource = videoSource()->rawValue().toString();
if(vSource == videoSourceNoVideo || vSource == videoDisabled) {
return false;
}
//-- If UDP, check if port is set
if(vSource == videoSourceUDP) {
qCDebug(VideoManagerLog) << "Testing configuration for UDP Stream:" << udpPort()->rawValue().toInt();
......
......@@ -504,8 +504,7 @@ void Vehicle::_commonInit(void)
_flightTimeFact.setRawValue(0);
// Set video stream to udp if running ArduSub and Video is disabled
if (sub() && _settingsManager->videoSettings()->videoSource()->rawValue() == VideoSettings::videoDisabled)
{
if (sub() && _settingsManager->videoSettings()->videoSource()->rawValue() == VideoSettings::videoDisabled) {
_settingsManager->videoSettings()->videoSource()->setRawValue(VideoSettings::videoSourceUDP);
}
......
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