Unverified Commit 97ad69d0 authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #7933 from DonLakeFlyer/IndicatorSpacing

Toolbar: Indicator spacing
parents 291b845f 8acfb307
......@@ -28,6 +28,8 @@ QGCComboBox {
currentIndex: -1
sizeToContents: true
property bool showIndicator: true
property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
property bool _armed: _activeVehicle ? _activeVehicle.armed : false
......
......@@ -24,6 +24,8 @@ Item {
anchors.bottom: parent.bottom
width: batteryIndicatorRow.width
property bool showIndicator: true
function getBatteryColor() {
if(activeVehicle) {
if(activeVehicle.battery.percentRemaining.value > 75) {
......
......@@ -24,6 +24,8 @@ Item {
anchors.top: parent.top
anchors.bottom: parent.bottom
property bool showIndicator: true
Component {
id: gpsInfo
......
......@@ -19,10 +19,11 @@ import QGroundControl.Palette 1.0
//-- GPS Indicator
Item {
id: _root
width: visible ? (gpsValuesColumn.x + gpsValuesColumn.width) * 1.1 : 0
width: (gpsValuesColumn.x + gpsValuesColumn.width) * 1.1
anchors.top: parent.top
anchors.bottom: parent.bottom
visible: QGroundControl.gpsRtk.connected.value
property bool showIndicator: QGroundControl.gpsRtk.connected.value
Component {
id: gpsInfo
......
......@@ -23,10 +23,9 @@ import QGroundControl.Vehicle 1.0
Item {
anchors.top: parent.top
anchors.bottom: parent.bottom
width: visible ? priorityLinkSelector.width : 0
visible: _visible
width: priorityLinkSelector.width
property bool _visible: false
property bool showIndicator: false
QGCLabel {
id: priorityLinkSelector
......@@ -66,7 +65,7 @@ Item {
}
}
_visible = links.length > 1 && has_hl
showIndicator = links.length > 1 && has_hl
}
}
......
......@@ -84,10 +84,12 @@ Item {
Repeater {
model: activeVehicle ? activeVehicle.toolBarIndicators : []
Loader {
id: indicatorLoader
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.margins: ScreenTools.defaultFontPixelHeight * 0.66
source: modelData;
source: modelData
visible: item.showIndicator
}
}
}
......
......@@ -25,7 +25,9 @@ Item {
anchors.top: parent.top
anchors.bottom: parent.bottom
property bool _isMessageImportant: activeVehicle ? !activeVehicle.messageTypeNormal && !activeVehicle.messageTypeNone : false
property bool showIndicator: true
property bool _isMessageImportant: activeVehicle ? !activeVehicle.messageTypeNormal && !activeVehicle.messageTypeNone : false
function getMessageColor() {
if (activeVehicle) {
......
......@@ -28,6 +28,8 @@ QGCComboBox {
currentIndex: -1
sizeToContents: true
property bool showIndicator: true
property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
property var _flightModes: _activeVehicle ? _activeVehicle.flightModes : [ ]
......
......@@ -26,7 +26,8 @@ QGCComboBox {
currentIndex: -1
sizeToContents: true
model: _vehicleModel
visible: _multipleVehicles
property bool showIndicator: _multipleVehicles
property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
property bool _multipleVehicles: _activeVehicle ? QGroundControl.multiVehicleManager.vehicles.count > 1 : false
......
......@@ -23,8 +23,10 @@ Item {
width: rssiRow.width * 1.1
anchors.top: parent.top
anchors.bottom: parent.bottom
visible: activeVehicle ? activeVehicle.supportsRadio : true
property bool showIndicator: _activeVehicle.supportsRadio
property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
property bool _rcRSSIAvailable: activeVehicle ? activeVehicle.rcRSSI > 0 && activeVehicle.rcRSSI <= 100 : false
Component {
......
......@@ -22,10 +22,12 @@ Item {
id: _root
anchors.top: parent.top
anchors.bottom: parent.bottom
width: _hasTelemetry ? telemIcon.width * 1.1 : 0
visible: _hasTelemetry
width: telemIcon.width * 1.1
property bool _hasTelemetry: activeVehicle ? activeVehicle.telemetryLRSSI !== 0 : false
property bool showIndicator: _hasTelemetry
property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
property bool _hasTelemetry: _activeVehicle ? _activeVehicle.telemetryLRSSI !== 0 : false
Component {
id: telemRSSIInfo
......
......@@ -26,10 +26,12 @@ QGCLabel {
text: _fwdFlight ? qsTr("VTOL: Fixed Wing") : qsTr("VTOL: Multi-Rotor")
font.pointSize: ScreenTools.mediumFontPointSize
color: qgcPal.buttonText
visible: activeVehicle ? activeVehicle.vtol && activeVehicle.px4Firmware : false
width: visible ? implicitWidth : 0
width: implicitWidth
property bool _fwdFlight: activeVehicle ? activeVehicle.vtolInFwdFlight : false
property bool showIndicator: _activeVehicle.vtol && _activeVehicle.px4Firmware
property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
property bool _fwdFlight: _activeVehicle.vtolInFwdFlight
QGCMouseArea {
fillItem: parent
......
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