From 4de54a838194a034b4f059b85f2800a196b0e538 Mon Sep 17 00:00:00 2001 From: dogmaphobic Date: Wed, 1 Apr 2015 02:04:09 -0400 Subject: [PATCH] Tweaking Altitude and Speed gadgets. --- src/ui/flightdisplay/FlightDisplay.qml | 4 ++-- .../components/QGCAltitudeWidget.qml | 19 +++++++++++-------- .../components/QGCSpeedWidget.qml | 19 +++++++++++-------- 3 files changed, 24 insertions(+), 18 deletions(-) diff --git a/src/ui/flightdisplay/FlightDisplay.qml b/src/ui/flightdisplay/FlightDisplay.qml index 3b3c37615..73413e1af 100644 --- a/src/ui/flightdisplay/FlightDisplay.qml +++ b/src/ui/flightdisplay/FlightDisplay.qml @@ -311,7 +311,7 @@ Rectangle { QGCAltitudeWidget { id: altitudeWidget anchors.right: parent.right - width: 40 + width: 60 altitude: flightDisplay.altitudeWGS84 z: 30 } @@ -319,7 +319,7 @@ Rectangle { QGCSpeedWidget { id: speedWidget anchors.left: parent.left - width: 40 + width: 60 speed: flightDisplay.groundSpeed z: 40 } diff --git a/src/ui/flightdisplay/components/QGCAltitudeWidget.qml b/src/ui/flightdisplay/components/QGCAltitudeWidget.qml index e1ac294fe..ce5a5448c 100644 --- a/src/ui/flightdisplay/components/QGCAltitudeWidget.qml +++ b/src/ui/flightdisplay/components/QGCAltitudeWidget.qml @@ -67,26 +67,29 @@ Rectangle { height: parent.height * 0.75 > 280 ? 280 : parent.height * 0.75 clip: true smooth: true + radius: 5 border.color: Qt.rgba(1,1,1,0.25) gradient: Gradient { - GradientStop { position: 0.0; color: Qt.rgba(0,0,0,0.35) } - GradientStop { position: 0.5; color: Qt.rgba(0,0,0,0.15) } - GradientStop { position: 1.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.25) } + GradientStop { position: 1.0; color: Qt.rgba(0,0,0,0.65) } } Column{ - anchors.horizontalCenter: parent.horizontalCenter - anchors.verticalCenter: parent.verticalCenter + width: parent.width + anchors.verticalCenter: parent.verticalCenter spacing: _reticleSpacing Repeater { model: _speedArray Rectangle { - width: root.width + property int _alt: modelData + width: (_alt % 10 === 0) ? 15 : 30 + anchors.left: parent.left height: _reticleHeight - color: Qt.rgba(1,1,1,0.1) + color: Qt.rgba(1,1,1,0.35) Text { - property real _alt: modelData visible: (_alt % 10 === 0) anchors.horizontalCenter: parent.horizontalCenter + anchors.horizontalCenterOffset: 25 anchors.verticalCenter: parent.verticalCenter antialiasing: true font.weight: _alt < 0 ? Font.Light : Font.DemiBold diff --git a/src/ui/flightdisplay/components/QGCSpeedWidget.qml b/src/ui/flightdisplay/components/QGCSpeedWidget.qml index 2b326a998..aeb0daaaf 100644 --- a/src/ui/flightdisplay/components/QGCSpeedWidget.qml +++ b/src/ui/flightdisplay/components/QGCSpeedWidget.qml @@ -41,26 +41,29 @@ Rectangle { height: parent.height * 0.75 > 280 ? 280 : parent.height * 0.75 clip: true smooth: true + radius: 5 border.color: Qt.rgba(1,1,1,0.25) gradient: Gradient { - GradientStop { position: 0.0; color: Qt.rgba(0,0,0,0.35) } - GradientStop { position: 0.5; color: Qt.rgba(0,0,0,0.15) } - GradientStop { position: 1.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.25) } + GradientStop { position: 1.0; color: Qt.rgba(0,0,0,0.65) } } Column{ - anchors.horizontalCenter: parent.horizontalCenter - anchors.verticalCenter: parent.verticalCenter + width: parent.width + anchors.verticalCenter: parent.verticalCenter spacing: _reticleSpacing Repeater { model: 40 Rectangle { - width: root.width + property int _speed: -(index - 20) + width: (_speed % 5 === 0) ? 15 : 30 + anchors.right: parent.right height: _reticleHeight - color: Qt.rgba(1,1,1,0.1) + color: Qt.rgba(1,1,1,0.35) Text { - property real _speed: -(index - 20) visible: (_speed % 5 === 0) anchors.horizontalCenter: parent.horizontalCenter + anchors.horizontalCenterOffset: -25 anchors.verticalCenter: parent.verticalCenter antialiasing: true font.weight: _speed < 0 ? Font.Light : Font.DemiBold -- 2.22.0