Commit e36b3dd2 authored by Don Gagne's avatar Don Gagne

Add zoom buttons

parent b2635848
...@@ -100,7 +100,7 @@ QGCView { ...@@ -100,7 +100,7 @@ QGCView {
property real toolbarHeight: qgcView.height - ScreenTools.availableHeight property real toolbarHeight: qgcView.height - ScreenTools.availableHeight
property real rightPanelWidth: _rightPanelWidth property real rightPanelWidth: _rightPanelWidth
property real leftToolWidth: mapFitFunctions.x + mapFitFunctions.width property real leftToolWidth: toolStrip.x + toolStrip.width
} }
MissionController { MissionController {
...@@ -810,46 +810,8 @@ QGCView { ...@@ -810,46 +810,8 @@ QGCView {
} }
} }
/*
FIXME: Need to put these back into ToolStrip
//-- Zoom Map In
RoundButton {
id: mapZoomPlus
anchors.topMargin: ScreenTools.defaultFontPixelHeight
anchors.top: mapTypeButton.bottom
anchors.left: mapTypeButton.left
visible: !ScreenTools.isTinyScreen && !ScreenTools.isShortScreen
buttonImage: "/qmlimages/ZoomPlus.svg"
lightBorders: _lightWidgetBorders
onClicked: {
if(editorMap)
editorMap.zoomLevel += 0.5
checked = false
}
}
//-- Zoom Map Out
RoundButton {
id: mapZoomMinus
anchors.topMargin: ScreenTools.defaultFontPixelHeight
anchors.top: mapZoomPlus.bottom
anchors.left: mapZoomPlus.left
visible: !ScreenTools.isTinyScreen && !ScreenTools.isShortScreen
buttonImage: "/qmlimages/ZoomMinus.svg"
lightBorders: _lightWidgetBorders
onClicked: {
if(editorMap)
editorMap.zoomLevel -= 0.5
checked = false
}
}
*/
ToolStrip { ToolStrip {
id: toolStrip
anchors.leftMargin: ScreenTools.defaultFontPixelWidth anchors.leftMargin: ScreenTools.defaultFontPixelWidth
anchors.left: parent.left anchors.left: parent.left
anchors.topMargin: _toolButtonTopMargin anchors.topMargin: _toolButtonTopMargin
...@@ -857,9 +819,12 @@ QGCView { ...@@ -857,9 +819,12 @@ QGCView {
color: qgcPal.window color: qgcPal.window
title: qsTr("Plan") title: qsTr("Plan")
z: QGroundControl.zOrderWidgets z: QGroundControl.zOrderWidgets
showAlternateIcon: [ false, false, _syncDropDownController.dirty, false, false ] showAlternateIcon: [ false, false, _syncDropDownController.dirty, false, false, false, false ]
rotateImage: [ false, false, _syncDropDownController.syncInProgress, false, false ] rotateImage: [ false, false, _syncDropDownController.syncInProgress, false, false, false, false ]
buttonEnabled: [ true, true, !_syncDropDownController.syncInProgress, true, true ] buttonEnabled: [ true, true, !_syncDropDownController.syncInProgress, true, true, true, true ]
buttonVisible: [ true, true, true, true, true, _showZoom, _showZoom ]
property bool _showZoom: !ScreenTools.isShortScreen
model: [ model: [
{ {
...@@ -887,12 +852,34 @@ QGCView { ...@@ -887,12 +852,34 @@ QGCView {
name: "Map", name: "Map",
iconSource: "/qmlimages/MapType.svg", iconSource: "/qmlimages/MapType.svg",
dropPanelComponent: mapTypeDropPanel dropPanelComponent: mapTypeDropPanel
},
{
name: "In",
iconSource: "/qmlimages/ZoomPlus.svg"
},
{
name: "Out",
iconSource: "/qmlimages/ZoomMinus.svg"
} }
] ]
onClicked: { onClicked: {
if (index == 0) { switch (index == 0) {
case 0:
_addWaypointOnClick = checked _addWaypointOnClick = checked
break
case 5:
editorMap.zoomLevel += 0.5
break
case 6:
editorMap.zoomLevel -= 0.5
break
case 5:
editorMap.zoomLevel += 0.5
break
case 6:
editorMap.zoomLevel -= 0.5
break
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment