Commit fbe19144 authored by dogmaphobic's avatar dogmaphobic

Switching all Text types to QGCLabel

parent 2c32084d
......@@ -27,9 +27,8 @@ This file is part of the QGROUNDCONTROL project
* @author Gus Grubba <mavlink@grubba.com>
*/
// 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
......
......@@ -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"
......
......@@ -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;
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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)
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment