QML UI: use action button for save in GPS preferences

For consistency

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2016-02-13 21:50:31 -08:00
parent 23b877a869
commit da5be2249d

View file

@ -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
}