Browse Source

FlightDisplay: put zoom buttons on the left of the scale

The map scale width changes when the zoom up/down buttons are clicked.
When buttons are on the right, and when the user quickly clicks a zoom
up/down button several times, the first click change the scale, which
changes the buttons position. Subsequent clicks are most of the time not
where the user wanted to put them.

Putting buttons on the left of the scale will keep them at a fixed
position, fixing this unfortunate behavior.

Signed-off-by: Julien Olivain <ju.o@free.fr>
QGC4.4
Julien Olivain 3 years ago committed by Julian Oes
parent
commit
ba73f2a9f5
No known key found for this signature in database
GPG Key ID: F0ED380FEA56DE41
  1. 2
      src/FlightDisplay/FlyViewMap.qml
  2. 2
      src/FlightDisplay/FlyViewWidgetLayer.qml

2
src/FlightDisplay/FlyViewMap.qml

@ -646,7 +646,7 @@ FlightMap { @@ -646,7 +646,7 @@ FlightMap {
anchors.left: parent.left
anchors.top: parent.top
mapControl: _root
buttonsOnLeft: false
buttonsOnLeft: true
visible: !ScreenTools.isTinyScreen && QGroundControl.corePlugin.options.flyView.showMapScale && mapControl.pipState.state === mapControl.pipState.windowState
property real centerInset: visible ? parent.height - y : 0

2
src/FlightDisplay/FlyViewWidgetLayer.qml

@ -300,7 +300,7 @@ Item { @@ -300,7 +300,7 @@ Item {
anchors.left: toolStrip.right
anchors.top: parent.top
mapControl: _mapControl
buttonsOnLeft: false
buttonsOnLeft: true
visible: !ScreenTools.isTinyScreen && QGroundControl.corePlugin.options.flyView.showMapScale && mapControl.pipState.state === mapControl.pipState.fullState
property real topEdgeCenterInset: visible ? y + height : 0

Loading…
Cancel
Save