Commit fbe19144 authored by dogmaphobic's avatar dogmaphobic
Browse files

Switching all Text types to QGCLabel

parent 2c32084d
...@@ -27,9 +27,8 @@ This file is part of the QGROUNDCONTROL project ...@@ -27,9 +27,8 @@ This file is part of the QGROUNDCONTROL project
* @author Gus Grubba <mavlink@grubba.com> * @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 QtQuick 2.4
import QGroundControl.Controls 1.0
Rectangle { Rectangle {
id: root id: root
...@@ -92,7 +91,7 @@ Rectangle { ...@@ -92,7 +91,7 @@ Rectangle {
width: (_alt % 10 === 0) ? 10 : 15 width: (_alt % 10 === 0) ? 10 : 15
height: _reticleHeight height: _reticleHeight
color: Qt.rgba(1,1,1,0.35) color: Qt.rgba(1,1,1,0.35)
Text { QGCLabel {
visible: (_alt % 10 === 0) visible: (_alt % 10 === 0)
x: 20 x: 20
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
......
...@@ -28,6 +28,7 @@ This file is part of the QGROUNDCONTROL project ...@@ -28,6 +28,7 @@ This file is part of the QGROUNDCONTROL project
*/ */
import QtQuick 2.4 import QtQuick 2.4
import QGroundControl.Controls 1.0
Item { Item {
id: root id: root
...@@ -60,7 +61,7 @@ Item { ...@@ -60,7 +61,7 @@ Item {
height: 25 height: 25
border.color: Qt.rgba(1,1,1,0.15) border.color: Qt.rgba(1,1,1,0.15)
color: Qt.rgba(0,0,0,0.25) color: Qt.rgba(0,0,0,0.25)
Text { QGCLabel {
text: heading.toFixed(0) text: heading.toFixed(0)
font.weight: Font.DemiBold font.weight: Font.DemiBold
color: "white" color: "white"
......
...@@ -28,6 +28,7 @@ This file is part of the QGROUNDCONTROL project ...@@ -28,6 +28,7 @@ This file is part of the QGROUNDCONTROL project
*/ */
import QtQuick 2.4 import QtQuick 2.4
import QGroundControl.Controls 1.0
import QGroundControl.ScreenTools 1.0 import QGroundControl.ScreenTools 1.0
Item { Item {
...@@ -70,7 +71,7 @@ Item { ...@@ -70,7 +71,7 @@ Item {
height: size * 0.2 height: size * 0.2
border.color: Qt.rgba(1,1,1,0.15) border.color: Qt.rgba(1,1,1,0.15)
color: Qt.rgba(0,0,0,0.65) color: Qt.rgba(0,0,0,0.65)
Text { QGCLabel {
text: heading.toFixed(0) text: heading.toFixed(0)
font.weight: Font.DemiBold font.weight: Font.DemiBold
font.pointSize: _fontSize < 1 ? 1 : _fontSize; font.pointSize: _fontSize < 1 ? 1 : _fontSize;
......
...@@ -28,6 +28,7 @@ This file is part of the QGROUNDCONTROL project ...@@ -28,6 +28,7 @@ This file is part of the QGROUNDCONTROL project
*/ */
import QtQuick 2.1 import QtQuick 2.1
import QGroundControl.Controls 1.0
Rectangle { Rectangle {
id: root id: root
...@@ -44,14 +45,14 @@ Rectangle { ...@@ -44,14 +45,14 @@ Rectangle {
Column{ Column{
anchors.centerIn: parent anchors.centerIn: parent
spacing: 4 spacing: 4
Text { QGCLabel {
text: 'h: ' + altitude.toFixed(0) text: 'h: ' + altitude.toFixed(0)
font.weight: Font.DemiBold font.weight: Font.DemiBold
color: "white" color: "white"
anchors.right: parent.right anchors.right: parent.right
visible: showAltitude visible: showAltitude
} }
Text { QGCLabel {
text: 'vZ: ' + vertZ.toFixed(0) text: 'vZ: ' + vertZ.toFixed(0)
color: "white" color: "white"
font.weight: showAltitude ? Font.Normal : Font.DemiBold font.weight: showAltitude ? Font.Normal : Font.DemiBold
......
...@@ -28,6 +28,7 @@ This file is part of the QGROUNDCONTROL project ...@@ -28,6 +28,7 @@ This file is part of the QGROUNDCONTROL project
*/ */
import QtQuick 2.1 import QtQuick 2.1
import QGroundControl.Controls 1.0
Rectangle { Rectangle {
id: root id: root
...@@ -44,14 +45,14 @@ Rectangle { ...@@ -44,14 +45,14 @@ Rectangle {
Column{ Column{
anchors.centerIn: parent anchors.centerIn: parent
spacing: 4 spacing: 4
Text { QGCLabel {
text: 'GS: ' + groundspeed.toFixed(0) text: 'GS: ' + groundspeed.toFixed(0)
font.weight: Font.DemiBold font.weight: Font.DemiBold
color: "white" color: "white"
anchors.right: parent.right anchors.right: parent.right
visible: showGroundSpeed visible: showGroundSpeed
} }
Text { QGCLabel {
text: 'AS: ' + airspeed.toFixed(0) text: 'AS: ' + airspeed.toFixed(0)
color: "white" color: "white"
anchors.right: parent.right anchors.right: parent.right
......
...@@ -31,6 +31,7 @@ import QtQuick 2.4 ...@@ -31,6 +31,7 @@ import QtQuick 2.4
import QtPositioning 5.3 import QtPositioning 5.3
import QtLocation 5.3 import QtLocation 5.3
import QGroundControl.Controls 1.0
import QGroundControl.FlightControls 1.0 import QGroundControl.FlightControls 1.0
Rectangle { Rectangle {
...@@ -204,7 +205,7 @@ Rectangle { ...@@ -204,7 +205,7 @@ Rectangle {
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
anchors.left: scaleImage.right anchors.left: scaleImage.right
} }
Text { QGCLabel {
id: scaleText id: scaleText
color: "white" color: "white"
font.weight: Font.DemiBold font.weight: Font.DemiBold
......
...@@ -29,6 +29,7 @@ This file is part of the QGROUNDCONTROL project ...@@ -29,6 +29,7 @@ This file is part of the QGROUNDCONTROL project
import QtQuick 2.1 import QtQuick 2.1
import QGroundControl.ScreenTools 1.0 import QGroundControl.ScreenTools 1.0
import QGroundControl.Controls 1.0
Rectangle { Rectangle {
property ScreenTools screenTools: ScreenTools { } property ScreenTools screenTools: ScreenTools { }
...@@ -64,7 +65,7 @@ Rectangle { ...@@ -64,7 +65,7 @@ Rectangle {
color: "white" color: "white"
antialiasing: true antialiasing: true
smooth: true smooth: true
Text { QGCLabel {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
anchors.horizontalCenterOffset: -(_longDash * 0.8) anchors.horizontalCenterOffset: -(_longDash * 0.8)
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
...@@ -75,7 +76,7 @@ Rectangle { ...@@ -75,7 +76,7 @@ Rectangle {
color: "white" color: "white"
visible: (_pitch != 0) && ((_pitch % 10) === 0) visible: (_pitch != 0) && ((_pitch % 10) === 0)
} }
Text { QGCLabel {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
anchors.horizontalCenterOffset: (_longDash * 0.8) anchors.horizontalCenterOffset: (_longDash * 0.8)
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
......
...@@ -38,7 +38,8 @@ ...@@ -38,7 +38,8 @@
** **
****************************************************************************/ ****************************************************************************/
import QtQuick 2.0 import QtQuick 2.1
import QGroundControl.Controls 1.0
Item { Item {
id: slider; id: slider;
...@@ -80,7 +81,7 @@ Item { ...@@ -80,7 +81,7 @@ Item {
anchors.bottomMargin: 4 anchors.bottomMargin: 4
x: Math.max(Math.min(handle.x + (handle.width - width )/2, slider.width - width),0) x: Math.max(Math.min(handle.x + (handle.width - width )/2, slider.width - width),0)
visible: mouseRegion.pressed visible: mouseRegion.pressed
Text{ QGCLabel{
id: label id: label
color: "darkgrey" color: "darkgrey"
text: slider.value.toFixed(2) text: slider.value.toFixed(2)
......
...@@ -29,6 +29,7 @@ This file is part of the QGROUNDCONTROL project ...@@ -29,6 +29,7 @@ This file is part of the QGROUNDCONTROL project
import QtQuick 2.4 import QtQuick 2.4
import QGroundControl.ScreenTools 1.0 import QGroundControl.ScreenTools 1.0
import QGroundControl.Controls 1.0
Rectangle { Rectangle {
id: root id: root
...@@ -68,7 +69,7 @@ Rectangle { ...@@ -68,7 +69,7 @@ Rectangle {
anchors.right: parent.right anchors.right: parent.right
height: _reticleHeight height: _reticleHeight
color: Qt.rgba(1,1,1,0.35) color: Qt.rgba(1,1,1,0.35)
Text { QGCLabel {
visible: (_speed % 5 === 0) visible: (_speed % 5 === 0)
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
anchors.horizontalCenterOffset: -30 anchors.horizontalCenterOffset: -30
......
Supports Markdown
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