diff options
| author | luigi1111 <luigi1111w@gmail.com> | 2018-11-09 13:20:22 -0600 |
|---|---|---|
| committer | luigi1111 <luigi1111w@gmail.com> | 2018-11-09 13:20:22 -0600 |
| commit | 7969f698662a7a5f122bb7edb0cee5cd91defae4 (patch) | |
| tree | 5e5aa773a6f79ec835a6a71d790e03fbca36a85c /components | |
| parent | ac709fed455b1426181198d5f8b57d54ed2a6ea5 (diff) | |
| parent | 39855241fcd0747ebe95e2e92cd5cfcb2d5a64be (diff) | |
| download | monzero-gui-7969f698662a7a5f122bb7edb0cee5cd91defae4.tar.gz monzero-gui-7969f698662a7a5f122bb7edb0cee5cd91defae4.tar.xz monzero-gui-7969f698662a7a5f122bb7edb0cee5cd91defae4.zip | |
Merge pull request #1699
3985524 password dialog: show error in place (xiphon)
Diffstat (limited to 'components')
| -rw-r--r-- | components/PasswordDialog.qml | 20 | ||||
| -rw-r--r-- | components/Style.qml | 1 |
2 files changed, 20 insertions, 1 deletions
diff --git a/components/PasswordDialog.qml b/components/PasswordDialog.qml index 1da76a6d..230db37f 100644 --- a/components/PasswordDialog.qml +++ b/components/PasswordDialog.qml @@ -42,15 +42,17 @@ Item { property alias password: passwordInput.text property string walletName + property string errorText // same signals as Dialog has signal accepted() signal rejected() signal closeCallback() - function open(walletName) { + function open(walletName, errorText) { inactiveOverlay.visible = true // draw appwindow inactive root.walletName = walletName ? walletName : "" + root.errorText = errorText ? errorText : ""; leftPanel.enabled = false middlePanel.enabled = false titleBar.enabled = false @@ -60,6 +62,10 @@ Item { passwordInput.text = "" } + function showError(errorText) { + open(root.walletName, errorText); + } + function close() { inactiveOverlay.visible = false leftPanel.enabled = true @@ -93,6 +99,18 @@ Item { color: MoneroComponents.Style.defaultFontColor } + Label { + text: root.errorText + visible: root.errorText + + anchors.left: parent.left + color: MoneroComponents.Style.errorColor + font.pixelSize: 16 * scaleRatio + font.family: MoneroComponents.Style.fontLight.name + Layout.fillWidth: true + wrapMode: Text.Wrap + } + TextField { id : passwordInput Layout.topMargin: 6 diff --git a/components/Style.qml b/components/Style.qml index bf0a5084..f57dcfe4 100644 --- a/components/Style.qml +++ b/components/Style.qml @@ -12,6 +12,7 @@ QtObject { property string defaultFontColor: "white" property string dimmedFontColor: "#BBBBBB" + property string errorColor: "#FA6800" property string inputBoxBackground: "black" property string inputBoxBackgroundError: "#FFDDDD" property string inputBoxColor: "white" |
