Commit 3e4843f6 authored by Pierre TILAK's avatar Pierre TILAK

Restore old Instrument Widget Layout

The instrument widget layout is now a stack of :
- QGCAttitudeWidget
- Item that contain ValuesWidget
- QGCCompassWidget
parent 8a6ebbec
......@@ -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
}
}
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