Browse Source

custom-example: Fix tool insets in flyview

Make the custom fly view layer properly inherit so as to pass them through to the map,
and also use them to dodge the virtual joysticks.
QGC4.4
James Mare 2 years ago committed by Don Gagne
parent
commit
5407ea6f2d
  1. 14
      custom-example/res/CustomFlyViewOverlay.qml

14
custom-example/res/CustomFlyViewOverlay.qml

@ -55,8 +55,18 @@ Item { @@ -55,8 +55,18 @@ Item {
QGCToolInsets {
id: _totalToolInsets
topEdgeCenterInset: compassArrowIndicator.y + compassArrowIndicator.height
leftEdgeTopInset: parentToolInsets.leftEdgeTopInset
leftEdgeCenterInset: parentToolInsets.leftEdgeCenterInset
leftEdgeBottomInset: parentToolInsets.leftEdgeBottomInset
rightEdgeTopInset: parentToolInsets.rightEdgeTopInset
rightEdgeCenterInset: parentToolInsets.rightEdgeCenterInset
rightEdgeBottomInset: parent.width - compassBackground.x
topEdgeLeftInset: parentToolInsets.topEdgeLeftInset
topEdgeCenterInset: compassArrowIndicator.y + compassArrowIndicator.height
topEdgeRightInset: parentToolInsets.topEdgeRightInset
bottomEdgeLeftInset: parentToolInsets.bottomEdgeLeftInset
bottomEdgeCenterInset: parentToolInsets.bottomEdgeCenterInset
bottomEdgeRightInset: parent.height - attitudeIndicator.y
}
//-------------------------------------------------------------------------
@ -209,7 +219,7 @@ Item { @@ -209,7 +219,7 @@ Item {
Rectangle {
id: attitudeIndicator
anchors.bottomMargin: _toolsMargin
anchors.bottomMargin: _toolsMargin + parentToolInsets.bottomEdgeRightInset
anchors.rightMargin: _toolsMargin
anchors.bottom: parent.bottom
anchors.right: parent.right

Loading…
Cancel
Save