Browse Source

Fix display of vertical instrument panel

QGC4.4
DonLakeFlyer 4 years ago committed by Don Gagne
parent
commit
7d25fb1ed0
  1. 23
      src/FlightDisplay/FlyViewWidgetLayer.qml
  2. 2
      src/FlightMap/Widgets/PhotoVideoControl.qml
  3. 24
      src/FlightMap/Widgets/QGCInstrumentWidgetAlternate.qml

23
src/FlightDisplay/FlyViewWidgetLayer.qml

@ -120,10 +120,31 @@ Item { @@ -120,10 +120,31 @@ Item {
}
PhotoVideoControl {
id: photoVideoControl
anchors.margins: _toolsMargin
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
width: _rightPanelWidth
state: _verticalCenter ? "verticalCenter" : "topAnchor"
states: [
State {
name: "verticalCenter"
AnchorChanges {
target: photoVideoControl
anchors.top: undefined
anchors.verticalCenter: _root.verticalCenter
}
},
State {
name: "topAnchor"
AnchorChanges {
target: photoVideoControl
anchors.verticalCenter: undefined
anchors.top: instrumentPanel.bottom
}
}
]
property bool _verticalCenter: !QGroundControl.settingsManager.flyViewSettings.alternateInstrumentPanel.rawValue
}
TelemetryValuesBar {

2
src/FlightMap/Widgets/PhotoVideoControl.qml

@ -27,7 +27,7 @@ Rectangle { @@ -27,7 +27,7 @@ Rectangle {
height: mainLayout.height + (_margins * 2)
color: "#80000000"
radius: _margins
visible: !QGroundControl.settingsManager.flyViewSettings.alternateInstrumentPanel.rawValue && (_mavlinkCamera || _videoStreamAvailable || _simpleCameraAvailable) && multiVehiclePanelSelector.showSingleVehiclePanel
visible: (_mavlinkCamera || _videoStreamAvailable || _simpleCameraAvailable) && multiVehiclePanelSelector.showSingleVehiclePanel
property real _margins: ScreenTools.defaultFontPixelHeight / 2
property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle

24
src/FlightMap/Widgets/QGCInstrumentWidgetAlternate.qml

@ -7,7 +7,6 @@ @@ -7,7 +7,6 @@
*
****************************************************************************/
import QtQuick 2.3
import QGroundControl 1.0
@ -18,30 +17,23 @@ import QGroundControl.FlightMap 1.0 @@ -18,30 +17,23 @@ import QGroundControl.FlightMap 1.0
import QGroundControl.Palette 1.0
Rectangle {
id: root
height: _outerRadius * 4 + _valuesWidget.height
radius: _outerRadius
color: qgcPal.window
// These properties are expected to be in the Loader
// property real maxHeight
// property bool showValues - true: show value pages
height: _outerRadius * 4
radius: _outerRadius
color: QGroundControl.globalPalette.window
property real _innerRadius: (width - (_topBottomMargin * 2)) / 2
property real _outerRadius: _innerRadius + _topBottomMargin * 2
property real _margins: (width * 0.05) / 2
property real _outerMargin: (width * 0.05) / 2
property real _outerRadius: width / 2
property real _innerRadius: _outerRadius - _outerMargin
// Prevent all clicks from going through to lower layers
DeadMouseArea {
anchors.fill: parent
}
QGCPalette { id: qgcPal }
QGCAttitudeWidget {
id: attitude
anchors.horizontalCenter: parent.horizontalCenter
anchors.margins : _margins
anchors.topMargin: _outerMargin
anchors.top: parent.top
size: _innerRadius * 2
vehicle: globals.activeVehicle
@ -50,7 +42,7 @@ Rectangle { @@ -50,7 +42,7 @@ Rectangle {
QGCCompassWidget {
id: compass
anchors.horizontalCenter: parent.horizontalCenter
anchors.margins: _margins
anchors.topMargin: _outerMargin * 2
anchors.top: attitude.bottom
size: _innerRadius * 2
vehicle: globals.activeVehicle

Loading…
Cancel
Save