aboutsummaryrefslogtreecommitdiff
path: root/wizard
diff options
context:
space:
mode:
authorJacob Brydolf <jacob@rabash.se>2016-10-01 03:05:26 +0200
committerIlya Kitaev <mbg033@gmail.com>2016-10-10 00:15:17 +0300
commitbd8646dd194771a9ff39bc75530d169a6d570ef6 (patch)
treeb3caebdc079ec909f6962d680e9c38ba292781b7 /wizard
parentfab66fec38a37c35bac90836a462404b5e4b464c (diff)
downloadmonzero-gui-bd8646dd194771a9ff39bc75530d169a6d570ef6.tar.gz
monzero-gui-bd8646dd194771a9ff39bc75530d169a6d570ef6.tar.xz
monzero-gui-bd8646dd194771a9ff39bc75530d169a6d570ef6.zip
UX improvements in wizard
- password page styling - tab navigation / focus on load - click language loads next page
Diffstat (limited to 'wizard')
-rw-r--r--wizard/WizardPassword.qml28
-rw-r--r--wizard/WizardPasswordInput.qml24
-rw-r--r--wizard/WizardWelcome.qml1
3 files changed, 35 insertions, 18 deletions
diff --git a/wizard/WizardPassword.qml b/wizard/WizardPassword.qml
index 8318a785..476c5742 100644
--- a/wizard/WizardPassword.qml
+++ b/wizard/WizardPassword.qml
@@ -52,6 +52,8 @@ Item {
} else {
passwordPage.titleText = qsTr("Now that your wallet has been restored, please set a password for the wallet") + translationManager.emptyString
}
+
+ passwordItem.focus = true;
}
function onPageClosed(settingsObject) {
@@ -146,30 +148,34 @@ Item {
anchors.topMargin: 24
width: 300
height: 62
+ placeholderText : qsTr("Password") + translationManager.emptyString;
+ KeyNavigation.tab: retypePasswordItem
onChanged: handlePassword()
- }
-
- PrivacyLevelSmall {
- id: privacyLevel
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.top: passwordItem.bottom
- anchors.topMargin: 24
- background: "#F0EEEE"
- interactive: false
}
WizardPasswordInput {
id: retypePasswordItem
- anchors.top: privacyLevel.bottom
+ anchors.top: passwordItem.bottom
anchors.horizontalCenter: parent.horizontalCenter
anchors.topMargin: 24
width: 300
height: 62
+ placeholderText : qsTr("Confirm password") + translationManager.emptyString;
+ KeyNavigation.tab: passwordItem
onChanged: handlePassword()
}
+ PrivacyLevelSmall {
+ id: privacyLevel
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.top: retypePasswordItem.bottom
+ anchors.topMargin: 60
+ background: "#F0EEEE"
+ interactive: false
+ }
+
Component.onCompleted: {
console.log
}
diff --git a/wizard/WizardPasswordInput.qml b/wizard/WizardPasswordInput.qml
index 82597421..00201ecf 100644
--- a/wizard/WizardPasswordInput.qml
+++ b/wizard/WizardPasswordInput.qml
@@ -27,24 +27,34 @@
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.0
+import QtQuick.Controls 1.4
+import QtQuick.Controls.Styles 1.4
-Item {
+FocusScope {
property alias password: password.text
+ property alias placeholderText: password.placeholderText
signal changed(string password)
- TextInput {
+ TextField {
id : password
+ focus:true
anchors.fill: parent
- horizontalAlignment: TextInput.AlignHCenter
+ horizontalAlignment: TextInput.AlignLeft
verticalAlignment: TextInput.AlignVCenter
font.family: "Arial"
font.pixelSize: 32
- renderType: Text.NativeRendering
- color: "#35B05A"
- passwordCharacter: "•"
echoMode: TextInput.Password
- focus: true
+ style: TextFieldStyle {
+ renderType: Text.NativeRendering
+ textColor: "#35B05A"
+ passwordCharacter: "•"
+ background: Rectangle {
+ radius: 0
+ border.width: 0
+ }
+ }
+
Keys.onReleased: {
changed(text)
}
diff --git a/wizard/WizardWelcome.qml b/wizard/WizardWelcome.qml
index 46448e2c..ef97f984 100644
--- a/wizard/WizardWelcome.qml
+++ b/wizard/WizardWelcome.qml
@@ -163,6 +163,7 @@ Item {
if (data !== null || data !== undefined) {
var locale = data.locale
translationManager.setLanguage(locale.split("_")[0]);
+ wizard.switchPage(true)
}
}
}