From 6dfac6a0812516b32b0fddc945deb36c0b80ef84 Mon Sep 17 00:00:00 2001 From: Sebastian Kügler Date: Sat, 7 Nov 2015 03:01:16 +0100 Subject: Improve layout of login dialog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add margins consistent with other pages - Top-align the dialog, we want to keep the inputs as high as possible on the screen to prevent the on-screen-keyboard from covering them - Add a checkbox to show the password, with input on mobile devices, this is a commonly found and useful feature - Remove Cancel button, this is just navigation chrome, the user can simply use the back button in the top bar (will be fixed in a subsequent patch) Signed-off-by: Sebastian Kügler Signed-off-by: Dirk Hohndel --- qt-mobile/qml/Preferences.qml | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/qt-mobile/qml/Preferences.qml b/qt-mobile/qml/Preferences.qml index 8f4a15328..36da051e6 100644 --- a/qt-mobile/qml/Preferences.qml +++ b/qt-mobile/qml/Preferences.qml @@ -16,11 +16,13 @@ Item { GridLayout { columns: 2 - anchors.centerIn: parent - width: parent.width + anchors.fill: parent + anchors.margins: units.gridUnit Label { text: "Enter your Subsurface cloud credentials" + Layout.bottomMargin: units.largeSpacing + font.pointSize: units.titlePointSize Layout.columnSpan: 2 } @@ -45,6 +47,18 @@ Item { Layout.fillWidth: true } + Label { + text: "Show password" + } + + CheckBox { + checked: false + id: showPassword + onCheckedChanged: { + password.echoMode = checked ? TextInput.Normal : TextInput.Password + } + } + Label { text: "Save Password locally" } @@ -54,6 +68,7 @@ Item { id: savePassword } + Item { width: units.gridUnit; height: width } Item { height: saveButton.height width: saveButton.width @@ -72,16 +87,7 @@ Item { } Item { - height: cancelButton.height - width: cancelButton.width - Button { - id: cancelButton - text: "Cancel" - - onClicked: { - stackView.pop(); - } - } + Layout.fillHeight: true } } } -- cgit v1.2.3-70-g09d2