diff --git a/src/FlightMap/Images/MapAddMission.svg b/src/FlightMap/Images/MapAddMission.svg
index a74d313b8f34d5cad0df1ab0b4e1416d80f841d8..2cbcb9ca21e833160e3c5e9f0ad52e6d3cefdf97 100644
--- a/src/FlightMap/Images/MapAddMission.svg
+++ b/src/FlightMap/Images/MapAddMission.svg
@@ -1,10 +1,10 @@
diff --git a/src/FlightMap/Images/MapCenter.svg b/src/FlightMap/Images/MapCenter.svg
index 02ca06b79aa2efe6b432a7a5a1652c6237bad937..37f6fc0ef8d55d23f1cf359d4e3244d9a5e9717f 100644
--- a/src/FlightMap/Images/MapCenter.svg
+++ b/src/FlightMap/Images/MapCenter.svg
@@ -1,13 +1,12 @@
diff --git a/src/FlightMap/Images/MapHome.svg b/src/FlightMap/Images/MapHome.svg
index 3344ab9c4dc509db2854cc6fa9be72eee03e58c6..70d7c7110a81b4a4bcf4e34eebbf7e60a4b565a4 100644
--- a/src/FlightMap/Images/MapHome.svg
+++ b/src/FlightMap/Images/MapHome.svg
@@ -1,11 +1,10 @@
diff --git a/src/FlightMap/Images/MapSync.svg b/src/FlightMap/Images/MapSync.svg
index ddf5dc4c0288611b34212a4d42609dd52a3788a2..466bae5ad8290324666198212205610e213bc4d1 100644
--- a/src/FlightMap/Images/MapSync.svg
+++ b/src/FlightMap/Images/MapSync.svg
@@ -1,29 +1,28 @@
diff --git a/src/FlightMap/Images/MapType.svg b/src/FlightMap/Images/MapType.svg
index 19e55e7109f88cc0793804d7eb85d8eeb485a68d..7ee0ff10757da3a99ea130e68a5f98b07b322f89 100644
--- a/src/FlightMap/Images/MapType.svg
+++ b/src/FlightMap/Images/MapType.svg
@@ -1,10 +1,10 @@
diff --git a/src/MissionEditor/MissionEditor.qml b/src/MissionEditor/MissionEditor.qml
index 53ab3f8dda287b878a64859b03aab8713bcf859c..6d594178d34dca4fa64cececf1a1e5b072d31f3a 100644
--- a/src/MissionEditor/MissionEditor.qml
+++ b/src/MissionEditor/MissionEditor.qml
@@ -139,9 +139,9 @@ QGCView {
RoundButton {
id: addMissionItemsButton
buttonImage: "/qmlimages/MapAddMission.svg"
- opacity: _addMissionItems ? 1.0 : 0.75
+ exclusiveGroup: _dropButtonsExclusiveGroup
onClicked: {
- _addMissionItems = !_addMissionItems
+ _addMissionItems = addMissionItemsButton.checked
_showHomePositionManager = false
}
}
@@ -149,9 +149,9 @@ QGCView {
RoundButton {
id: homePositionManagerButton
buttonImage: "/qmlimages/MapHome.svg"
- opacity: _showHomePositionManager ? 1.0 : 0.75
+ exclusiveGroup: _dropButtonsExclusiveGroup
onClicked: {
- _showHomePositionManager = !_showHomePositionManager
+ _showHomePositionManager = homePositionManagerButton.checked
_addMissionItems = false
}
}
@@ -163,6 +163,11 @@ QGCView {
viewportMargins: ScreenTools.defaultFontPixelWidth / 2
exclusiveGroup: _dropButtonsExclusiveGroup
+ onClicked: {
+ _showHomePositionManager = false
+ _addMissionItems = false
+ }
+
dropDownComponent: Component {
Row {
spacing: ScreenTools.defaultFontPixelWidth
@@ -236,6 +241,11 @@ QGCView {
viewportMargins: ScreenTools.defaultFontPixelWidth / 2
exclusiveGroup: _dropButtonsExclusiveGroup
+ onClicked: {
+ _showHomePositionManager = false
+ _addMissionItems = false
+ }
+
dropDownComponent: Component {
Row {
spacing: ScreenTools.defaultFontPixelWidth
@@ -288,6 +298,11 @@ QGCView {
viewportMargins: ScreenTools.defaultFontPixelWidth / 2
exclusiveGroup: _dropButtonsExclusiveGroup
+ onClicked: {
+ _showHomePositionManager = false
+ _addMissionItems = false
+ }
+
dropDownComponent: Component {
Row {
spacing: ScreenTools.defaultFontPixelWidth
diff --git a/src/QmlControls/DropButton.qml b/src/QmlControls/DropButton.qml
index 06a5d8c0a7b79299653caf7ead2970e02376ed9e..4a782bc76480c87f0a21d2d5ae416b4df95c8942 100644
--- a/src/QmlControls/DropButton.qml
+++ b/src/QmlControls/DropButton.qml
@@ -8,6 +8,7 @@ import QGroundControl.Palette 1.0
Item {
id: _root
+ signal clicked()
property alias buttonImage: button.source
property real radius: (ScreenTools.defaultFontPixelHeight * 3) / 2
property int dropDirection: dropDown
@@ -148,8 +149,10 @@ Item {
width: _viewportMaxRight -_viewportMaxLeft
height: _viewportMaxBottom - _viewportMaxTop
visible: checked
-
- onClicked: checked = false
+ onClicked: {
+ checked = false
+ _root.clicked()
+ }
}
// Button
@@ -158,19 +161,21 @@ Item {
radius: width / 2
border.width: 2
border.color: "white"
- color: "transparent"
+ opacity: checked ? 0.95 : 0.65
+ color: checked ? "orange" : "black"
Image {
id: button
anchors.fill: parent
fillMode: Image.PreserveAspectFit
- opacity: checked ? 1.0 : 0.75
mipmap: true
smooth: true
MouseArea {
anchors.fill: parent
-
- onClicked: checked = !checked
+ onClicked: {
+ checked = !checked
+ _root.clicked()
+ }
}
} // Image - button
}
diff --git a/src/QmlControls/RoundButton.qml b/src/QmlControls/RoundButton.qml
index 5da0bdc81a83f760fe601da0011c78168aa70ffd..f32b274eaec2531b948753336ff5902958283d98 100644
--- a/src/QmlControls/RoundButton.qml
+++ b/src/QmlControls/RoundButton.qml
@@ -14,12 +14,22 @@ Item {
width: radius * 2
height: radius * 2
+ property bool checked: false
+ property ExclusiveGroup exclusiveGroup: null
+
+ onExclusiveGroupChanged: {
+ if (exclusiveGroup) {
+ exclusiveGroup.bindCheckable(_root)
+ }
+ }
+
Rectangle {
anchors.fill: parent
radius: width / 2
border.width: 2
border.color: "white"
- color: "transparent"
+ opacity: checked ? 0.95 : 0.65
+ color: checked ? "orange" : "black"
Image {
id: button
anchors.fill: parent
@@ -28,7 +38,10 @@ Item {
smooth: true
MouseArea {
anchors.fill: parent
- onClicked: _root.clicked()
+ onClicked: {
+ checked = !checked
+ _root.clicked()
+ }
}
}
}