summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2016-02-13 21:50:31 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-02-13 21:50:31 -0800
commitda5be2249dc70db0b76d807107768e269de2ace2 (patch)
tree0163590e853986ff4815c562fc5673af10654c1b
parent23b877a86962354fcdac272f7d6fecd1257126a7 (diff)
downloadsubsurface-da5be2249dc70db0b76d807107768e269de2ace2.tar.gz
QML UI: use action button for save in GPS preferences
For consistency Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--qt-mobile/qml/Preferences.qml38
1 files changed, 10 insertions, 28 deletions
diff --git a/qt-mobile/qml/Preferences.qml b/qt-mobile/qml/Preferences.qml
index f20e83467..9607b63ee 100644
--- a/qt-mobile/qml/Preferences.qml
+++ b/qt-mobile/qml/Preferences.qml
@@ -8,18 +8,17 @@ import org.subsurfacedivelog.mobile 1.0
MobileComponents.Page {
-/* this can be done by hitting the back key
- contextualActions: [
- Action {
- text: "Close Preferences"
- iconName: "dialog-cancel"
- onTriggered: {
- stackView.pop()
- contextDrawer.close()
- }
+ mainAction: Action {
+ text: "Save"
+ iconName: "document-save"
+ onTriggered: {
+ manager.distanceThreshold = distanceThreshold.text
+ manager.timeThreshold = timeThreshold.text
+ manager.savePreferences()
+ stackView.pop()
}
- ]
- */
+ }
+
GridLayout {
signal accept
@@ -67,23 +66,6 @@ MobileComponents.Page {
Layout.fillWidth: true
}
- Item { width: MobileComponents.Units.gridUnit; height: width }
- Item {
- Layout.preferredHeight: saveButton.height
- Layout.preferredWidth: saveButton.width
- SubsurfaceButton {
- id: saveButton
- text: "Save"
- anchors.centerIn: parent
- onClicked: {
- manager.distanceThreshold = distanceThreshold.text
- manager.timeThreshold = timeThreshold.text
- manager.savePreferences()
- stackView.pop()
- }
- }
- }
-
Item {
Layout.fillHeight: true
}