diff --git a/src/PlanView/FWLandingPatternMapVisual.qml b/src/PlanView/FWLandingPatternMapVisual.qml
index 5dedcdec767b5b1c76e93587548c8b92bd123d57..d7b1a65530c3d53d202208caeb7ae03deeec7881 100644
--- a/src/PlanView/FWLandingPatternMapVisual.qml
+++ b/src/PlanView/FWLandingPatternMapVisual.qml
@@ -457,6 +457,7 @@ Item {
visible: _missionItem.isCurrentItem
sourceItem: HeightIndicator {
+ map: _root.map
heightText: Math.floor(QGroundControl.metersToAppSettingsDistanceUnits(_transitionAltitudeMeters)) +
QGroundControl.appSettingsDistanceUnitsString + "*"
}
@@ -488,6 +489,7 @@ Item {
visible: _missionItem.isCurrentItem
sourceItem: HeightIndicator {
+ map: _root.map
heightText: Math.floor(QGroundControl.metersToAppSettingsDistanceUnits(_midSlopeAltitudeMeters)) +
QGroundControl.appSettingsDistanceUnitsString + "*"
}
@@ -522,6 +524,7 @@ Item {
coordinate: _missionItem.loiterTangentCoordinate
sourceItem: HeightIndicator {
+ map: _root.map
heightText: _missionItem.loiterAltitude.value.toFixed(1) + QGroundControl.appSettingsDistanceUnitsString
}
}
diff --git a/src/QmlControls/HeightIndicator.qml b/src/QmlControls/HeightIndicator.qml
index ad86efe207efff4ee644d33d609b28fa5358a881..ee1fb8fd40a2fd3d4bfcbfd613592050b3f11f7b 100644
--- a/src/QmlControls/HeightIndicator.qml
+++ b/src/QmlControls/HeightIndicator.qml
@@ -2,45 +2,51 @@ import QtQuick 2.3
import QtQuick.Controls 1.2
import QtQuick.Layouts 1.11
-import QGroundControl.ScreenTools 1.0
+import QGroundControl.ScreenTools 1.0
+import QGroundControl.Palette 1.0
ColumnLayout {
- spacing: 0
+ id: _root
+ spacing: 0
- property color textColor: "white"
+ property var map
property string heightText: "30 ft"
+ property color _textColor: _mapPalette.text
+
+ QGCMapPalette { id: _mapPalette; lightColors: _root.map.isSatelliteMap }
+
Rectangle {
- width: ScreenTools.defaultFontPixelWidth * 3
- height: 1
- color: textColor
- Layout.alignment: Qt.AlignHCenter
+ width: ScreenTools.defaultFontPixelWidth * 3
+ height: 1
+ color: _textColor
+ Layout.alignment: Qt.AlignHCenter
}
Rectangle {
- width: 1
- height: ScreenTools.defaultFontPixelWidth * 1
- color: textColor
- Layout.alignment: Qt.AlignHCenter
+ width: 1
+ height: ScreenTools.defaultFontPixelWidth * 1
+ color: _textColor
+ Layout.alignment: Qt.AlignHCenter
}
- QGCLabel {
- text: heightText
- color: textColor
- Layout.alignment: Qt.AlignHCenter
+ QGCMapLabel {
+ map: _root.map
+ text: heightText
+ Layout.alignment: Qt.AlignHCenter
}
Rectangle {
- width: 1
- height: ScreenTools.defaultFontPixelWidth * 1
- color: textColor
- Layout.alignment: Qt.AlignHCenter
+ width: 1
+ height: ScreenTools.defaultFontPixelWidth * 1
+ color: _textColor
+ Layout.alignment: Qt.AlignHCenter
}
Rectangle {
- width: ScreenTools.defaultFontPixelWidth * 3
- height: 1
- color: textColor
- Layout.alignment: Qt.AlignHCenter
+ width: ScreenTools.defaultFontPixelWidth * 3
+ height: 1
+ color: _textColor
+ Layout.alignment: Qt.AlignHCenter
}
}