diff options
| author | xiphon <xiphon@protonmail.com> | 2020-09-24 14:08:33 +0000 |
|---|---|---|
| committer | xiphon <xiphon@protonmail.com> | 2020-09-24 14:32:52 +0000 |
| commit | be1f63f93d8f47f3af29722281282c82727856f4 (patch) | |
| tree | 3d5585382b722a5884f672e8ba3b290dfa279bad /components/PasswordDialog.qml | |
| parent | 98ce87a5722c6cd2c19e86f3d1fc316e827c05c9 (diff) | |
| download | monzero-gui-be1f63f93d8f47f3af29722281282c82727856f4.tar.gz monzero-gui-be1f63f93d8f47f3af29722281282c82727856f4.tar.xz monzero-gui-be1f63f93d8f47f3af29722281282c82727856f4.zip | |
PasswordDialog: configurable Ok btn text/icon, non-primary Cancel
Co-authored-by: rating89us <45968869+rating89us@users.noreply.github.com>
Diffstat (limited to 'components/PasswordDialog.qml')
| -rw-r--r-- | components/PasswordDialog.qml | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/components/PasswordDialog.qml b/components/PasswordDialog.qml index 10a10954..977ec3a4 100644 --- a/components/PasswordDialog.qml +++ b/components/PasswordDialog.qml @@ -44,6 +44,8 @@ Item { property alias password: passwordInput1.text property string walletName + property var okButtonText + property string okButtonIcon property string errorText property bool passwordDialogMode property bool passphraseDialogMode @@ -75,10 +77,12 @@ Item { appWindow.updateBalance(); } - function open(walletName, errorText) { + function open(walletName, errorText, okButtonText, okButtonIcon) { passwordDialogMode = true; passphraseDialogMode = false; newPasswordDialogMode = false; + root.okButtonText = okButtonText; + root.okButtonIcon = okButtonIcon ? okButtonIcon : ""; _openInit(walletName, errorText); } @@ -274,6 +278,7 @@ Item { MoneroComponents.StandardButton { id: cancelButton + primary: false small: true text: qsTr("Cancel") + translationManager.emptyString KeyNavigation.tab: passwordInput1 @@ -282,8 +287,10 @@ Item { MoneroComponents.StandardButton { id: okButton + fontAwesomeIcon: true + rightIcon: okButtonIcon small: true - text: qsTr("Ok") + translationManager.emptyString + text: okButtonText ? okButtonText : qsTr("Ok") + translationManager.emptyString KeyNavigation.tab: cancelButton enabled: (passwordDialogMode == true) ? true : passwordInput1.text === passwordInput2.text onClicked: onOk() |
