From 3e4843f6a0d94468c692069dbac7a497fe81c55d Mon Sep 17 00:00:00 2001 From: Pierre TILAK Date: Tue, 9 Jul 2019 17:48:36 +1200 Subject: [PATCH] Restore old Instrument Widget Layout The instrument widget layout is now a stack of : - QGCAttitudeWidget - Item that contain ValuesWidget - QGCCompassWidget --- .../Widgets/QGCInstrumentWidgetAlternate.qml | 38 ++++++++++--------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/src/FlightMap/Widgets/QGCInstrumentWidgetAlternate.qml b/src/FlightMap/Widgets/QGCInstrumentWidgetAlternate.qml index 71df61ae0..4ab4eba1a 100644 --- a/src/FlightMap/Widgets/QGCInstrumentWidgetAlternate.qml +++ b/src/FlightMap/Widgets/QGCInstrumentWidgetAlternate.qml @@ -20,13 +20,13 @@ import QGroundControl.Palette 1.0 Rectangle { id: root width: getPreferredInstrumentWidth() - height: _outerRadius * 2 + height: _outerRadius * 4 + _valuesWidget.height radius: _outerRadius color: qgcPal.window border.width: 1 border.color: _isSatellite ? qgcPal.mapWidgetBorderLight : qgcPal.mapWidgetBorderDark - property real _innerRadius: (width - (_topBottomMargin * 3)) / 4 + property real _innerRadius: (width - (_topBottomMargin * 2)) / 2 property real _outerRadius: _innerRadius + _topBottomMargin property real _defaultSize: ScreenTools.defaultFontPixelHeight * (9) property real _sizeRatio: ScreenTools.isTinyScreen ? (width / _defaultSize) * 0.5 : width / _defaultSize @@ -45,27 +45,21 @@ Rectangle { QGCPalette { id: qgcPal } QGCAttitudeWidget { - id: attitude - anchors.leftMargin: _topBottomMargin - anchors.left: parent.left - size: _innerRadius * 2 - vehicle: activeVehicle - anchors.verticalCenter: parent.verticalCenter + id: attitude + anchors.topMargin : _topBottomMargin + anchors.bottomMargin: _topBottomMargin + anchors.top: parent.top + size: _innerRadius * 2 + vehicle: activeVehicle + anchors.horizontalCenter: parent.horizontalCenter } - QGCCompassWidget { - id: compass - anchors.leftMargin: _spacing - anchors.left: attitude.right - size: _innerRadius * 2 - vehicle: activeVehicle - anchors.verticalCenter: parent.verticalCenter - } Item { id: _valuesItem anchors.topMargin: ScreenTools.defaultFontPixelHeight / 4 - anchors.top: parent.bottom + anchors.top: attitude.bottom + anchors.bottom: compass.top width: parent.width height: _valuesWidget.height visible: widgetRoot.showValues @@ -88,4 +82,14 @@ Rectangle { maxHeight: _availableValueHeight } } + + QGCCompassWidget { + id: compass + anchors.bottom : parent.bottom + anchors.bottomMargin: _topBottomMargin + anchors.topMargin: _topBottomMargin + size: _innerRadius * 2 + vehicle: activeVehicle + anchors.horizontalCenter: parent.horizontalCenter + } } -- 2.22.0