Commit 754c0249 authored by dogmaphobic's avatar dogmaphobic

Consistent buttons in Fly and Mission views.

parent e855eb08
...@@ -695,6 +695,17 @@ QGCView { ...@@ -695,6 +695,17 @@ QGCView {
} // Item - Home Position Manager } // Item - Home Position Manager
*/ */
//-- Dismiss Drop Down (if any)
MouseArea {
anchors.fill: parent
enabled: _dropButtonsExclusiveGroup.current != null
onClicked: {
if(_dropButtonsExclusiveGroup.current)
_dropButtonsExclusiveGroup.current.checked = false
_dropButtonsExclusiveGroup.current = null
}
}
//-- Help Panel //-- Help Panel
Loader { Loader {
id: helpPanel id: helpPanel
...@@ -705,14 +716,23 @@ QGCView { ...@@ -705,14 +716,23 @@ QGCView {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
} }
Item {
id: toolbarSpacer
height: mainWindow.tbHeight
width: 1
}
//-- Vertical Tool Buttons
Column {
id: toolColumn
anchors.margins: ScreenTools.defaultFontPixelHeight
anchors.left: parent.left
anchors.top: toolbarSpacer.bottom
spacing: ScreenTools.defaultFontPixelHeight
RoundButton { RoundButton {
id: addMissionItemsButton id: addMissionItemsButton
anchors.margins: _margin
anchors.left: parent.left
y: (parent.height - (_toolButtonCount * height) - ((_toolButtonCount - 1) * _margin)) / 2
buttonImage: "/qmlimages/MapAddMission.svg" buttonImage: "/qmlimages/MapAddMission.svg"
exclusiveGroup: _dropButtonsExclusiveGroup
z: QGroundControl.zOrderWidgets z: QGroundControl.zOrderWidgets
onCheckedChanged: { onCheckedChanged: {
...@@ -734,14 +754,10 @@ QGCView { ...@@ -734,14 +754,10 @@ QGCView {
RoundButton { RoundButton {
id: deleteMissionItemButton id: deleteMissionItemButton
anchors.margins: _margin
anchors.left: parent.left
anchors.top: addMissionItemsButton.bottom
buttonImage: "/qmlimages/TrashDelete.svg" buttonImage: "/qmlimages/TrashDelete.svg"
exclusiveGroup: _dropButtonsExclusiveGroup
z: QGroundControl.zOrderWidgets z: QGroundControl.zOrderWidgets
onClicked: { onClicked: {
addMissionItemsButton.checked = false
itemDragger.clearItem() itemDragger.clearItem()
controller.deleteCurrentMissionItem() controller.deleteCurrentMissionItem()
checked = false checked = false
...@@ -752,20 +768,14 @@ QGCView { ...@@ -752,20 +768,14 @@ QGCView {
Home Position manager temporarily disable Home Position manager temporarily disable
RoundButton { RoundButton {
id: homePositionManagerButton id: homePositionManagerButton
anchors.margins: _margin
anchors.left: parent.left
anchors.top: deleteMissionItemButton.bottom
buttonImage: "/qmlimages/MapHome.svg" buttonImage: "/qmlimages/MapHome.svg"
exclusiveGroup: _dropButtonsExclusiveGroup //exclusiveGroup: _dropButtonsExclusiveGroup
z: QGroundControl.zOrderWidgets z: QGroundControl.zOrderWidgets
} }
*/ */
DropButton { DropButton {
id: centerMapButton id: centerMapButton
anchors.margins: _margin
anchors.left: parent.left
anchors.top: deleteMissionItemButton.bottom
dropDirection: dropRight dropDirection: dropRight
buttonImage: "/qmlimages/MapCenter.svg" buttonImage: "/qmlimages/MapCenter.svg"
viewportMargins: ScreenTools.defaultFontPixelWidth / 2 viewportMargins: ScreenTools.defaultFontPixelWidth / 2
...@@ -808,9 +818,6 @@ QGCView { ...@@ -808,9 +818,6 @@ QGCView {
DropButton { DropButton {
id: syncButton id: syncButton
anchors.margins: _margin
anchors.left: parent.left
anchors.top: centerMapButton.bottom
dropDirection: dropRight dropDirection: dropRight
buttonImage: _syncNeeded ? "/qmlimages/MapSyncChanged.svg" : "/qmlimages/MapSync.svg" buttonImage: _syncNeeded ? "/qmlimages/MapSyncChanged.svg" : "/qmlimages/MapSync.svg"
viewportMargins: ScreenTools.defaultFontPixelWidth / 2 viewportMargins: ScreenTools.defaultFontPixelWidth / 2
...@@ -822,9 +829,6 @@ QGCView { ...@@ -822,9 +829,6 @@ QGCView {
DropButton { DropButton {
id: mapTypeButton id: mapTypeButton
anchors.margins: _margin
anchors.left: parent.left
anchors.top: syncButton.bottom
dropDirection: dropRight dropDirection: dropRight
buttonImage: "/qmlimages/MapType.svg" buttonImage: "/qmlimages/MapType.svg"
viewportMargins: ScreenTools.defaultFontPixelWidth / 2 viewportMargins: ScreenTools.defaultFontPixelWidth / 2
...@@ -859,16 +863,40 @@ QGCView { ...@@ -859,16 +863,40 @@ QGCView {
} }
} }
//-- Zoom Map In
RoundButton {
id: mapZoomPlus
visible: !ScreenTools.isTinyScreen
buttonImage: "/qmlimages/ZoomPlus.svg"
z: QGroundControl.zOrderWidgets
onClicked: {
if(editorMap)
editorMap.zoomLevel += 0.5
checked = false
}
}
//-- Zoom Map Out
RoundButton {
id: mapZoomMinus
visible: !ScreenTools.isTinyScreen
buttonImage: "/qmlimages/ZoomMinus.svg"
z: QGroundControl.zOrderWidgets
onClicked: {
if(editorMap)
editorMap.zoomLevel -= 0.5
checked = false
}
}
RoundButton { RoundButton {
id: helpButton id: helpButton
anchors.margins: _margin
anchors.left: parent.left
anchors.top: mapTypeButton.bottom
buttonImage: "/qmlimages/Help.svg" buttonImage: "/qmlimages/Help.svg"
exclusiveGroup: _dropButtonsExclusiveGroup exclusiveGroup: _dropButtonsExclusiveGroup
z: QGroundControl.zOrderWidgets z: QGroundControl.zOrderWidgets
checked: _showHelp checked: _showHelp
} }
}
Rectangle { Rectangle {
id: waypointDistanceDisplay id: waypointDistanceDisplay
......
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