Browse Source

Switching all Text types to QGCLabel

QGC4.4
dogmaphobic 10 years ago
parent
commit
fbe191449b
  1. 5
      src/ui/qmlcommon/QGCAltitudeWidget.qml
  2. 3
      src/ui/qmlcommon/QGCCompass.qml
  3. 3
      src/ui/qmlcommon/QGCCompassInstrument.qml
  4. 5
      src/ui/qmlcommon/QGCCurrentAltitude.qml
  5. 5
      src/ui/qmlcommon/QGCCurrentSpeed.qml
  6. 3
      src/ui/qmlcommon/QGCMapBackground.qml
  7. 5
      src/ui/qmlcommon/QGCPitchWidget.qml
  8. 5
      src/ui/qmlcommon/QGCSlider.qml
  9. 3
      src/ui/qmlcommon/QGCSpeedWidget.qml

5
src/ui/qmlcommon/QGCAltitudeWidget.qml

@ -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>
*/
// 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 { @@ -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

3
src/ui/qmlcommon/QGCCompass.qml

@ -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 QGroundControl.Controls 1.0
Item {
id: root
@ -60,7 +61,7 @@ Item { @@ -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"

3
src/ui/qmlcommon/QGCCompassInstrument.qml

@ -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 QGroundControl.Controls 1.0
import QGroundControl.ScreenTools 1.0
Item {
@ -70,7 +71,7 @@ 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;

5
src/ui/qmlcommon/QGCCurrentAltitude.qml

@ -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 QGroundControl.Controls 1.0
Rectangle {
id: root
@ -44,14 +45,14 @@ Rectangle { @@ -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

5
src/ui/qmlcommon/QGCCurrentSpeed.qml

@ -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 QGroundControl.Controls 1.0
Rectangle {
id: root
@ -44,14 +45,14 @@ Rectangle { @@ -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

3
src/ui/qmlcommon/QGCMapBackground.qml

@ -31,6 +31,7 @@ import QtQuick 2.4 @@ -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 { @@ -204,7 +205,7 @@ Rectangle {
anchors.bottom: parent.bottom
anchors.left: scaleImage.right
}
Text {
QGCLabel {
id: scaleText
color: "white"
font.weight: Font.DemiBold

5
src/ui/qmlcommon/QGCPitchWidget.qml

@ -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 QGroundControl.ScreenTools 1.0
import QGroundControl.Controls 1.0
Rectangle {
property ScreenTools screenTools: ScreenTools { }
@ -64,7 +65,7 @@ Rectangle { @@ -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 { @@ -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

5
src/ui/qmlcommon/QGCSlider.qml

@ -38,7 +38,8 @@ @@ -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 { @@ -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)

3
src/ui/qmlcommon/QGCSpeedWidget.qml

@ -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 QGroundControl.ScreenTools 1.0
import QGroundControl.Controls 1.0
Rectangle {
id: root
@ -68,7 +69,7 @@ Rectangle { @@ -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

Loading…
Cancel
Save