diff --git a/src/ui/qmlcommon/QGCAltitudeWidget.qml b/src/ui/qmlcommon/QGCAltitudeWidget.qml index 60ecd7cd764727aada219ff1beb28be796c6cba7..60e26fe99f208a45093b3ebde9ecc61321864e83 100644 --- a/src/ui/qmlcommon/QGCAltitudeWidget.qml +++ b/src/ui/qmlcommon/QGCAltitudeWidget.qml @@ -27,9 +27,8 @@ This file is part of the QGROUNDCONTROL project * @author Gus Grubba */ -// TODO: This is temporary until I find a better way to display a large range of numbers - import QtQuick 2.4 +import QGroundControl.Controls 1.0 Rectangle { id: root @@ -92,7 +91,7 @@ Rectangle { width: (_alt % 10 === 0) ? 10 : 15 height: _reticleHeight color: Qt.rgba(1,1,1,0.35) - Text { + QGCLabel { visible: (_alt % 10 === 0) x: 20 anchors.verticalCenter: parent.verticalCenter diff --git a/src/ui/qmlcommon/QGCCompass.qml b/src/ui/qmlcommon/QGCCompass.qml index 2db3fd7dad61819c731cc645be6226cbf3272e97..ee00bd250d05bda7f59f3ca37a4362f5ca55faca 100644 --- a/src/ui/qmlcommon/QGCCompass.qml +++ b/src/ui/qmlcommon/QGCCompass.qml @@ -28,6 +28,7 @@ This file is part of the QGROUNDCONTROL project */ import QtQuick 2.4 +import QGroundControl.Controls 1.0 Item { id: root @@ -60,7 +61,7 @@ Item { height: 25 border.color: Qt.rgba(1,1,1,0.15) color: Qt.rgba(0,0,0,0.25) - Text { + QGCLabel { text: heading.toFixed(0) font.weight: Font.DemiBold color: "white" diff --git a/src/ui/qmlcommon/QGCCompassInstrument.qml b/src/ui/qmlcommon/QGCCompassInstrument.qml index d51d92aef31ef4403307b608909ac51a2efbf073..432ed96c597d14803a67cb48df2d951152dfdb49 100644 --- a/src/ui/qmlcommon/QGCCompassInstrument.qml +++ b/src/ui/qmlcommon/QGCCompassInstrument.qml @@ -28,6 +28,7 @@ This file is part of the QGROUNDCONTROL project */ import QtQuick 2.4 +import QGroundControl.Controls 1.0 import QGroundControl.ScreenTools 1.0 Item { @@ -70,7 +71,7 @@ Item { height: size * 0.2 border.color: Qt.rgba(1,1,1,0.15) color: Qt.rgba(0,0,0,0.65) - Text { + QGCLabel { text: heading.toFixed(0) font.weight: Font.DemiBold font.pointSize: _fontSize < 1 ? 1 : _fontSize; diff --git a/src/ui/qmlcommon/QGCCurrentAltitude.qml b/src/ui/qmlcommon/QGCCurrentAltitude.qml index 00ea307ef6e3a1168820fcb7428cf001c55d7c28..f793300939ad50fad52bdcaa1874983d7d275a19 100644 --- a/src/ui/qmlcommon/QGCCurrentAltitude.qml +++ b/src/ui/qmlcommon/QGCCurrentAltitude.qml @@ -28,6 +28,7 @@ This file is part of the QGROUNDCONTROL project */ import QtQuick 2.1 +import QGroundControl.Controls 1.0 Rectangle { id: root @@ -44,14 +45,14 @@ Rectangle { Column{ anchors.centerIn: parent spacing: 4 - Text { + QGCLabel { text: 'h: ' + altitude.toFixed(0) font.weight: Font.DemiBold color: "white" anchors.right: parent.right visible: showAltitude } - Text { + QGCLabel { text: 'vZ: ' + vertZ.toFixed(0) color: "white" font.weight: showAltitude ? Font.Normal : Font.DemiBold diff --git a/src/ui/qmlcommon/QGCCurrentSpeed.qml b/src/ui/qmlcommon/QGCCurrentSpeed.qml index ddbdcbfe59a725e8ec39094224a2311da39a44ee..8735477f0a29c29f1f97c38c120cbd8f5d3c691e 100644 --- a/src/ui/qmlcommon/QGCCurrentSpeed.qml +++ b/src/ui/qmlcommon/QGCCurrentSpeed.qml @@ -28,6 +28,7 @@ This file is part of the QGROUNDCONTROL project */ import QtQuick 2.1 +import QGroundControl.Controls 1.0 Rectangle { id: root @@ -44,14 +45,14 @@ Rectangle { Column{ anchors.centerIn: parent spacing: 4 - Text { + QGCLabel { text: 'GS: ' + groundspeed.toFixed(0) font.weight: Font.DemiBold color: "white" anchors.right: parent.right visible: showGroundSpeed } - Text { + QGCLabel { text: 'AS: ' + airspeed.toFixed(0) color: "white" anchors.right: parent.right diff --git a/src/ui/qmlcommon/QGCMapBackground.qml b/src/ui/qmlcommon/QGCMapBackground.qml index 7f4d0ff240f111a8937741f943a0c84dec2761fa..3e7007df36221a3818e4c7ffb438265a0dca3e61 100644 --- a/src/ui/qmlcommon/QGCMapBackground.qml +++ b/src/ui/qmlcommon/QGCMapBackground.qml @@ -31,6 +31,7 @@ import QtQuick 2.4 import QtPositioning 5.3 import QtLocation 5.3 +import QGroundControl.Controls 1.0 import QGroundControl.FlightControls 1.0 Rectangle { @@ -204,7 +205,7 @@ Rectangle { anchors.bottom: parent.bottom anchors.left: scaleImage.right } - Text { + QGCLabel { id: scaleText color: "white" font.weight: Font.DemiBold diff --git a/src/ui/qmlcommon/QGCPitchWidget.qml b/src/ui/qmlcommon/QGCPitchWidget.qml index d0ab4e619e8c5109b59b977314e0afc5dc5159a0..4f76ef7306443e80bf267f00dc3ca419878a8199 100644 --- a/src/ui/qmlcommon/QGCPitchWidget.qml +++ b/src/ui/qmlcommon/QGCPitchWidget.qml @@ -29,6 +29,7 @@ This file is part of the QGROUNDCONTROL project import QtQuick 2.1 import QGroundControl.ScreenTools 1.0 +import QGroundControl.Controls 1.0 Rectangle { property ScreenTools screenTools: ScreenTools { } @@ -64,7 +65,7 @@ Rectangle { color: "white" antialiasing: true smooth: true - Text { + QGCLabel { anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenterOffset: -(_longDash * 0.8) anchors.verticalCenter: parent.verticalCenter @@ -75,7 +76,7 @@ Rectangle { color: "white" visible: (_pitch != 0) && ((_pitch % 10) === 0) } - Text { + QGCLabel { anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenterOffset: (_longDash * 0.8) anchors.verticalCenter: parent.verticalCenter diff --git a/src/ui/qmlcommon/QGCSlider.qml b/src/ui/qmlcommon/QGCSlider.qml index 93fc8989b137fd191761daca6e4e81e83feb53cb..c7dc570b149b14de4964dad0a09fe1051dd5dca8 100644 --- a/src/ui/qmlcommon/QGCSlider.qml +++ b/src/ui/qmlcommon/QGCSlider.qml @@ -38,7 +38,8 @@ ** ****************************************************************************/ -import QtQuick 2.0 +import QtQuick 2.1 +import QGroundControl.Controls 1.0 Item { id: slider; @@ -80,7 +81,7 @@ Item { anchors.bottomMargin: 4 x: Math.max(Math.min(handle.x + (handle.width - width )/2, slider.width - width),0) visible: mouseRegion.pressed - Text{ + QGCLabel{ id: label color: "darkgrey" text: slider.value.toFixed(2) diff --git a/src/ui/qmlcommon/QGCSpeedWidget.qml b/src/ui/qmlcommon/QGCSpeedWidget.qml index 02e41d19ebff29323b8ee5082d2ebcb3a0634ea2..54bf0e6eb0a7f3228351731ef505e9cc982eecff 100644 --- a/src/ui/qmlcommon/QGCSpeedWidget.qml +++ b/src/ui/qmlcommon/QGCSpeedWidget.qml @@ -29,6 +29,7 @@ This file is part of the QGROUNDCONTROL project import QtQuick 2.4 import QGroundControl.ScreenTools 1.0 +import QGroundControl.Controls 1.0 Rectangle { id: root @@ -68,7 +69,7 @@ Rectangle { anchors.right: parent.right height: _reticleHeight color: Qt.rgba(1,1,1,0.35) - Text { + QGCLabel { visible: (_speed % 5 === 0) anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenterOffset: -30