Index: sources/gui/qml/pages/UserConfirmation.qml =================================================================== diff -u -rc9f8f8cf3c6c37fc6460d8675c62c9442c4d4263 -r4696b5fa37cc2ee744582fc70228736cad55ca63 --- sources/gui/qml/pages/UserConfirmation.qml (.../UserConfirmation.qml) (revision c9f8f8cf3c6c37fc6460d8675c62c9442c4d4263) +++ sources/gui/qml/pages/UserConfirmation.qml (.../UserConfirmation.qml) (revision 4696b5fa37cc2ee744582fc70228736cad55ca63) @@ -29,9 +29,16 @@ SettingsBase { id: _root objectName : "UserConfirmation" // SquishQt testability - property bool isPassword: false - readonly property string password: _password.textInput.text - property alias message : _message.text + property bool isPassword : false + property bool showPasswordReEntryField : false + readonly property string password : _password.textInput.text + readonly property string passwordReEntry : _passwordReEntry.textInput.text + property alias message : _message.text + + function clearPasswordReEntry() { + _passwordReEntry.textInput.text = "" + } + function clearPassword() { _password.textInput.text = "" } @@ -43,7 +50,13 @@ textInput .width : 450 anchors { top : parent.top - topMargin : topMarginContent + 120 // moved a little down to be more on center and close to keyboard top edge. + topMargin : { + if(_root.showPasswordReEntryField) { + return topMarginContent + 120 - _passwordReEntry.height + } else { + return topMarginContent + 120 // moved a little down to be more on center and close to keyboard top edge. + } + } horizontalCenter: parent.horizontalCenter } textInput.inputMethodHints : Qt.ImhNone @@ -67,6 +80,36 @@ onReleased : _password.textInput.echoMode = TextInput.Password } + TextEntry { id : _passwordReEntry + clip : true + visible : _root.showPasswordReEntryField + textInput .width : 450 + anchors { + top : _password.bottom + topMargin : height/2 // moved a little down to be more on center and close to keyboard top edge. + horizontalCenter: _password.horizontalCenter + } + textInput.inputMethodHints : Qt.ImhNone + textInput.echoMode : TextInput.Password + } + + Image { id : _showPasswordReEntryImage + visible : _passwordReEntry.visible + anchors.left : _passwordReEntry.right + anchors.leftMargin : Variables.minVGap + anchors.verticalCenter : _passwordReEntry.verticalCenter + width : Variables.iconsDiameter + height : Variables.iconsDiameter + source : "qrc:/images/iEye" + } + + MouseArea { + anchors.fill: _showPasswordReEntryImage + anchors.margins: -20 + onPressed : _passwordReEntry.textInput.echoMode = TextInput.Normal + onReleased : _passwordReEntry.textInput.echoMode = TextInput.Password + } + Text { id : _message visible : ! _root.isPassword text : "Do you ... ?"