Commit 4de54a83 authored by dogmaphobic's avatar dogmaphobic

Tweaking Altitude and Speed gadgets.

parent b904d19c
...@@ -311,7 +311,7 @@ Rectangle { ...@@ -311,7 +311,7 @@ Rectangle {
QGCAltitudeWidget { QGCAltitudeWidget {
id: altitudeWidget id: altitudeWidget
anchors.right: parent.right anchors.right: parent.right
width: 40 width: 60
altitude: flightDisplay.altitudeWGS84 altitude: flightDisplay.altitudeWGS84
z: 30 z: 30
} }
...@@ -319,7 +319,7 @@ Rectangle { ...@@ -319,7 +319,7 @@ Rectangle {
QGCSpeedWidget { QGCSpeedWidget {
id: speedWidget id: speedWidget
anchors.left: parent.left anchors.left: parent.left
width: 40 width: 60
speed: flightDisplay.groundSpeed speed: flightDisplay.groundSpeed
z: 40 z: 40
} }
......
...@@ -67,26 +67,29 @@ Rectangle { ...@@ -67,26 +67,29 @@ Rectangle {
height: parent.height * 0.75 > 280 ? 280 : parent.height * 0.75 height: parent.height * 0.75 > 280 ? 280 : parent.height * 0.75
clip: true clip: true
smooth: true smooth: true
radius: 5
border.color: Qt.rgba(1,1,1,0.25) border.color: Qt.rgba(1,1,1,0.25)
gradient: Gradient { gradient: Gradient {
GradientStop { position: 0.0; color: Qt.rgba(0,0,0,0.35) } GradientStop { position: 0.0; color: Qt.rgba(0,0,0,0.65) }
GradientStop { position: 0.5; color: Qt.rgba(0,0,0,0.15) } GradientStop { position: 0.5; color: Qt.rgba(0,0,0,0.25) }
GradientStop { position: 1.0; color: Qt.rgba(0,0,0,0.35) } GradientStop { position: 1.0; color: Qt.rgba(0,0,0,0.65) }
} }
Column{ Column{
anchors.horizontalCenter: parent.horizontalCenter width: parent.width
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
spacing: _reticleSpacing spacing: _reticleSpacing
Repeater { Repeater {
model: _speedArray model: _speedArray
Rectangle { Rectangle {
width: root.width property int _alt: modelData
width: (_alt % 10 === 0) ? 15 : 30
anchors.left: parent.left
height: _reticleHeight height: _reticleHeight
color: Qt.rgba(1,1,1,0.1) color: Qt.rgba(1,1,1,0.35)
Text { Text {
property real _alt: modelData
visible: (_alt % 10 === 0) visible: (_alt % 10 === 0)
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
anchors.horizontalCenterOffset: 25
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
antialiasing: true antialiasing: true
font.weight: _alt < 0 ? Font.Light : Font.DemiBold font.weight: _alt < 0 ? Font.Light : Font.DemiBold
......
...@@ -41,26 +41,29 @@ Rectangle { ...@@ -41,26 +41,29 @@ Rectangle {
height: parent.height * 0.75 > 280 ? 280 : parent.height * 0.75 height: parent.height * 0.75 > 280 ? 280 : parent.height * 0.75
clip: true clip: true
smooth: true smooth: true
radius: 5
border.color: Qt.rgba(1,1,1,0.25) border.color: Qt.rgba(1,1,1,0.25)
gradient: Gradient { gradient: Gradient {
GradientStop { position: 0.0; color: Qt.rgba(0,0,0,0.35) } GradientStop { position: 0.0; color: Qt.rgba(0,0,0,0.65) }
GradientStop { position: 0.5; color: Qt.rgba(0,0,0,0.15) } GradientStop { position: 0.5; color: Qt.rgba(0,0,0,0.25) }
GradientStop { position: 1.0; color: Qt.rgba(0,0,0,0.35) } GradientStop { position: 1.0; color: Qt.rgba(0,0,0,0.65) }
} }
Column{ Column{
anchors.horizontalCenter: parent.horizontalCenter width: parent.width
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
spacing: _reticleSpacing spacing: _reticleSpacing
Repeater { Repeater {
model: 40 model: 40
Rectangle { Rectangle {
width: root.width property int _speed: -(index - 20)
width: (_speed % 5 === 0) ? 15 : 30
anchors.right: parent.right
height: _reticleHeight height: _reticleHeight
color: Qt.rgba(1,1,1,0.1) color: Qt.rgba(1,1,1,0.35)
Text { Text {
property real _speed: -(index - 20)
visible: (_speed % 5 === 0) visible: (_speed % 5 === 0)
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
anchors.horizontalCenterOffset: -25
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
antialiasing: true antialiasing: true
font.weight: _speed < 0 ? Font.Light : Font.DemiBold font.weight: _speed < 0 ? Font.Light : Font.DemiBold
......
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