QML UI: use action button and Android back button to save / go back

This is more consistent with the rest of our UI

To make this work you once again need changes to the mobile components
that aren't upstream, yet.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2016-02-13 21:09:33 -08:00
parent ae116c5bc8
commit 5952b09b51
3 changed files with 34 additions and 29 deletions

View file

@ -14,6 +14,13 @@ Item {
property string password: password.text;
property bool issave: savePassword.checked;
function saveCredentials() {
manager.cloudUserName = login.text
manager.cloudPassword = password.text
manager.saveCloudPassword = savePassword.checked
manager.saveCloudCredentials()
}
ColumnLayout {
id: outerLayout
width: subsurfaceTheme.columnWidth - 2 * MobileComponents.Units.gridUnit
@ -71,34 +78,5 @@ Item {
}
}
Item { width: MobileComponents.Units.gridUnit; height: width }
RowLayout {
Item {
height: saveButton.height
width: saveButton.width
SubsurfaceButton {
id: saveButton
text: "Save"
onClicked: {
manager.cloudUserName = login.text
manager.cloudPassword = password.text
manager.saveCloudPassword = savePassword.checked
manager.saveCloudCredentials()
}
}
}
Item {
height: backButton.height
width: backButton.width
visible: diveListView.count > 0 && manager.credentialStatus != QMLManager.INVALID
SubsurfaceButton {
id: backButton
text: "Back to dive list"
onClicked: {
manager.credentialStatus = oldStatus
}
}
}
}
}
}