From 5407ea6f2d2ab87046a3fc1a710d0a5bb1a0a69c Mon Sep 17 00:00:00 2001 From: James Mare Date: Fri, 8 Sep 2023 14:42:04 +1000 Subject: [PATCH] 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. --- custom-example/res/CustomFlyViewOverlay.qml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/custom-example/res/CustomFlyViewOverlay.qml b/custom-example/res/CustomFlyViewOverlay.qml index 03ff9e8..2015f4f 100644 --- a/custom-example/res/CustomFlyViewOverlay.qml +++ b/custom-example/res/CustomFlyViewOverlay.qml @@ -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 { Rectangle { id: attitudeIndicator - anchors.bottomMargin: _toolsMargin + anchors.bottomMargin: _toolsMargin + parentToolInsets.bottomEdgeRightInset anchors.rightMargin: _toolsMargin anchors.bottom: parent.bottom anchors.right: parent.right