Browse Source

Fix normal and adsb vehicle sizing

Fix
QGC4.4
Don Gagne 2 years ago committed by Don Gagne
parent
commit
1d59706e2b
  1. 1
      src/FlightDisplay/FlyViewMap.qml
  2. 10
      src/FlightMap/MapItems/VehicleMapItem.qml

1
src/FlightDisplay/FlyViewMap.qml

@ -265,6 +265,7 @@ FlightMap { @@ -265,6 +265,7 @@ FlightMap {
heading: object.heading
alert: object.alert
map: _root
size: pipMode ? ScreenTools.defaultFontPixelHeight : ScreenTools.defaultFontPixelHeight * 2.5
z: QGroundControl.zOrderVehicles
}
}

10
src/FlightMap/MapItems/VehicleMapItem.qml

@ -19,12 +19,14 @@ import QGroundControl.Controls 1.0 @@ -19,12 +19,14 @@ import QGroundControl.Controls 1.0
/// Marker for displaying a vehicle location on the map
MapQuickItem {
id: _root
property var vehicle /// Vehicle object, undefined for ADSB vehicle
property var map
property double altitude: Number.NaN ///< NAN to not show
property string callsign: "" ///< Vehicle callsign
property double heading: vehicle ? vehicle.heading.value : Number.NaN ///< Vehicle heading, NAN for none
property real size: _adsbVehicle ? _adsbSize : _uavSize /// Size for icon
property real size: ScreenTools.defaultFontPixelHeight * 3 /// Default size for icon, most usage overrides this
property bool alert: false /// Collision alert
anchorPoint.x: vehicleItem.width / 2
@ -33,8 +35,6 @@ MapQuickItem { @@ -33,8 +35,6 @@ MapQuickItem {
property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
property bool _adsbVehicle: vehicle ? false : true
property real _uavSize: ScreenTools.defaultFontPixelHeight * 5
property real _adsbSize: ScreenTools.defaultFontPixelHeight * 2.5
property var _map: map
property bool _multiVehicle: QGroundControl.multiVehicleManager.vehicles.count > 1
@ -65,8 +65,8 @@ MapQuickItem { @@ -65,8 +65,8 @@ MapQuickItem {
id: vehicleIcon
source: _adsbVehicle ? (alert ? "/qmlimages/AlertAircraft.svg" : "/qmlimages/AwarenessAircraft.svg") : vehicle.vehicleImageOpaque
mipmap: true
width: size
sourceSize.width: size
width: _root.size
sourceSize.width: _root.size
fillMode: Image.PreserveAspectFit
transform: Rotation {
origin.x: vehicleIcon.width / 2

Loading…
Cancel
Save