diff --git a/src/FlightDisplay/FlyViewMap.qml b/src/FlightDisplay/FlyViewMap.qml index 2861e02..4c2b520 100644 --- a/src/FlightDisplay/FlyViewMap.qml +++ b/src/FlightDisplay/FlyViewMap.qml @@ -265,6 +265,7 @@ FlightMap { heading: object.heading alert: object.alert map: _root + size: pipMode ? ScreenTools.defaultFontPixelHeight : ScreenTools.defaultFontPixelHeight * 2.5 z: QGroundControl.zOrderVehicles } } diff --git a/src/FlightMap/MapItems/VehicleMapItem.qml b/src/FlightMap/MapItems/VehicleMapItem.qml index 176f479..49c8106 100644 --- a/src/FlightMap/MapItems/VehicleMapItem.qml +++ b/src/FlightMap/MapItems/VehicleMapItem.qml @@ -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 { 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 { 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