Commit 368501b3 authored by Don Gagne's avatar Don Gagne

Merge pull request #3063 from DonLakeFlyer/ConfirmSlider

Confirm slider: Remove cancel button support
parents 39b220f8 a383c8a4
......@@ -112,7 +112,7 @@ FlightMap {
// GoTo here waypoint
MapQuickItem {
coordinate: _gotoHereCoordinate
visible: _vehicle.guidedMode && _gotoHereCoordinate.isValid
visible: _activeVehicle && _activeVehicle.guidedMode && _gotoHereCoordinate.isValid
z: QGroundControl.zOrderMapItems
anchorPoint.x: sourceItem.width / 2
anchorPoint.y: sourceItem.height / 2
......
......@@ -429,41 +429,6 @@ Item {
}
}
}
/*
Row {
id: guidedModeConfirm
anchors.margins: _margins
anchors.top: parent.top
anchors.left: parent.left
spacing: _margins
visible: false
QGCLabel {
text: "Confirm " + _guidedModeBar.confirmText + " :"
anchors.verticalCenter: parent.verticalCenter
}
QGCButton {
text: "Yes"
onClicked: {
guidedModeConfirm.visible = false
guidedModeButtons.visible = true
_guidedModeBar.actionConfirmed()
altitudeSlider.visible = false
}
}
QGCButton {
text: "No"
onClicked: {
guidedModeConfirm.visible = false
guidedModeButtons.visible = true
altitudeSlider.visible = false
_flightMap._gotoHereCoordinate = QtPositioning.coordinate()
}
}
}*/
} // Rectangle - Guided mode buttons
MouseArea {
......@@ -480,7 +445,6 @@ Item {
anchors.top: _guidedModeBar.top
anchors.bottom: _guidedModeBar.bottom
anchors.horizontalCenter: parent.horizontalCenter
//showReject: true
visible: false
z: QGroundControl.zOrderWidgets
......
......@@ -16,7 +16,6 @@ Rectangle {
signal reject ///< Action rejected
property string confirmText ///< Text for slider
property bool showReject: false
property real _border: 4
property real _diameter: height - (_border * 2)
......@@ -52,14 +51,6 @@ Rectangle {
source: "/res/ArrowRight.svg"
}
/*
QGCLabel {
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
text: ">"
}
*/
MouseArea {
id: sliderDragArea
anchors.fill: parent
......@@ -69,7 +60,7 @@ Rectangle {
drag.minimumX: _border
drag.maximumX: _maxXDrag
property real _maxXDrag: _root.width - ((_diameter + _border) * (showReject ? 2 : 1))
property real _maxXDrag: _root.width - (_diameter + _border)
property bool dragActive: drag.active
onDragActiveChanged: {
......@@ -82,39 +73,4 @@ Rectangle {
}
}
}
Rectangle {
id: cancel
anchors.rightMargin: _border
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
height: _diameter
width: _diameter
radius: _diameter / 2
color: qgcPal.windowShade
opacity: 0.8
visible: showReject
Image {
anchors.centerIn: parent
width: parent.width * 0.8
height: parent.height * 0.8
fillMode: Image.PreserveAspectFit
smooth: true
source: "/res/cancel.svg"
}
/*
QGCLabel {
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
text: "X"
}
*/
MouseArea {
anchors.fill: parent
onClicked: _root.reject()
}
}
}
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