@ -56,7 +56,7 @@ Item {
QGCToolInsets {
QGCToolInsets {
id: _totalToolInsets
id: _totalToolInsets
leftEdgeTopInset: parentToolInsets . leftEdgeTopInset
leftEdgeTopInset: parentToolInsets . leftEdgeTopInset
leftEdgeCenterInset: parentToolInsets . leftEdgeCenterInset
leftEdgeCenterInset: exampleRectangle . leftEdgeCenterInset
leftEdgeBottomInset: parentToolInsets . leftEdgeBottomInset
leftEdgeBottomInset: parentToolInsets . leftEdgeBottomInset
rightEdgeTopInset: parentToolInsets . rightEdgeTopInset
rightEdgeTopInset: parentToolInsets . rightEdgeTopInset
rightEdgeCenterInset: parentToolInsets . rightEdgeCenterInset
rightEdgeCenterInset: parentToolInsets . rightEdgeCenterInset
@ -69,6 +69,26 @@ Item {
bottomEdgeRightInset: parent . height - attitudeIndicator . y
bottomEdgeRightInset: parent . height - attitudeIndicator . y
}
}
/ / T h i s i s a n e x a m p l e o f h o w y o u c a n u s e p a r e n t t o o l i n s e t s t o p o s i t i o n a n e l e m e n t o n t h e c u s t o m f l y v i e w l a y e r
/ / - w e u s e p a r e n t t o p E d g e L e f t I n s e t t o p o s i t i o n t h e w i d g e t b e l o w t h e t o o l s t r i p
/ / - w e u s e p a r e n t b o t t o m E d g e L e f t I n s e t t o d o d g e t h e v i r t u a l j o y s t i c k i f e n a b l e d
/ / - w e u s e t h e p a r e n t l e f t E d g e T o p I n s e t t o s i z e o u r e l e m e n t t o t h e s a m e w i d t h a s t h e T o o l S t r i p A c t i o n
/ / - w e e x p o r t t h e w i d t h o f t h i s e l e m e n t a s t h e l e f t E d g e C e n t e r I n s e t s o t h a t t h e m a p w i l l r e c e n t e r i f t h e v e h i c l e f l y s b e h i n d t h i s e l e m e n t
Rectangle {
id: exampleRectangle
visible: false / / t o s e e t h i s e x a m p l e , s e t t h i s t o t r u e . T o v i e w i n s e t s , e n a b l e t h e i n s e t s v i e w e r F l y V i e w . q m l
anchors.left: parent . left
anchors.top: parent . top
anchors.bottom: parent . bottom
anchors.topMargin: parentToolInsets . topEdgeLeftInset + _toolsMargin
anchors.bottomMargin: parentToolInsets . bottomEdgeLeftInset + _toolsMargin
anchors.leftMargin: _toolsMargin
width: parentToolInsets . leftEdgeTopInset - _toolsMargin
color: 'red'
property real leftEdgeCenterInset: visible ? x + width : 0
}
/ / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
/ / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
/ / - - H e a d i n g I n d i c a t o r
/ / - - H e a d i n g I n d i c a t o r
Rectangle {
Rectangle {