Browse Source

Stack callsign below altitude

QGC4.4
DonLakeFlyer 8 years ago
parent
commit
2f7deb1b66
  1. 14
      src/FlightMap/MapItems/VehicleMapItem.qml

14
src/FlightMap/MapItems/VehicleMapItem.qml

@ -57,6 +57,7 @@ MapQuickItem { @@ -57,6 +57,7 @@ MapQuickItem {
}
QGCMapLabel {
id: vehicleLabel
anchors.top: parent.bottom
anchors.horizontalCenter: parent.horizontalCenter
map: _map
@ -66,10 +67,21 @@ MapQuickItem { @@ -66,10 +67,21 @@ MapQuickItem {
property string vehicleLabelText: visible ?
(_adsbVehicle ?
callsign + " " + QGroundControl.metersToAppSettingsDistanceUnits(altitude).toFixed(0) + " " + QGroundControl.appSettingsDistanceUnitsString :
QGroundControl.metersToAppSettingsDistanceUnits(altitude).toFixed(0) + " " + QGroundControl.appSettingsDistanceUnitsString :
(_multiVehicle ? qsTr("Vehicle %1").arg(vehicle.id) : "")) :
""
}
QGCMapLabel {
anchors.top: vehicleLabel.bottom
anchors.horizontalCenter: parent.horizontalCenter
map: _map
text: vehicleLabelText
font.pointSize: ScreenTools.smallFontPointSize
visible: _adsbVehicle ? !isNaN(altitude) : _multiVehicle
property string vehicleLabelText: visible && _adsbVehicle ? callsign : ""
}
}
}

Loading…
Cancel
Save