aboutsummaryrefslogtreecommitdiff
path: root/src/qt/askpassphrasedialog.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-11-20 12:28:34 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2014-11-20 12:28:34 +0100
commite0a25c54ebecf09771d017ccb29c6777192de876 (patch)
tree01c876c98bfb03328c30505911282fbcaa1f6722 /src/qt/askpassphrasedialog.cpp
parentb5d1b1092998bc95313856d535c632ea5a8f9104 (diff)
downloadbitcoin-e0a25c54ebecf09771d017ccb29c6777192de876.tar.xz
qt: Make askpassphrase dialog behave more sanely
Set minimum sizes appropriately, and make sure that they are enforced. Replaces #5226.
Diffstat (limited to 'src/qt/askpassphrasedialog.cpp')
-rw-r--r--src/qt/askpassphrasedialog.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/qt/askpassphrasedialog.cpp b/src/qt/askpassphrasedialog.cpp
index a448d5a9a0..fa9ac6b135 100644
--- a/src/qt/askpassphrasedialog.cpp
+++ b/src/qt/askpassphrasedialog.cpp
@@ -23,6 +23,10 @@ AskPassphraseDialog::AskPassphraseDialog(Mode mode, QWidget *parent) :
{
ui->setupUi(this);
+ ui->passEdit1->setMinimumSize(ui->passEdit1->sizeHint());
+ ui->passEdit2->setMinimumSize(ui->passEdit2->sizeHint());
+ ui->passEdit3->setMinimumSize(ui->passEdit3->sizeHint());
+
ui->passEdit1->setMaxLength(MAX_PASSPHRASE_SIZE);
ui->passEdit2->setMaxLength(MAX_PASSPHRASE_SIZE);
ui->passEdit3->setMaxLength(MAX_PASSPHRASE_SIZE);
@@ -35,9 +39,9 @@ AskPassphraseDialog::AskPassphraseDialog(Mode mode, QWidget *parent) :
switch(mode)
{
case Encrypt: // Ask passphrase x2
+ ui->warningLabel->setText(tr("Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>ten or more random characters</b>, or <b>eight or more words</b>."));
ui->passLabel1->hide();
ui->passEdit1->hide();
- ui->warningLabel->setText(tr("Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>ten or more random characters</b>, or <b>eight or more words</b>."));
setWindowTitle(tr("Encrypt wallet"));
break;
case Unlock: // Ask passphrase
@@ -61,7 +65,6 @@ AskPassphraseDialog::AskPassphraseDialog(Mode mode, QWidget *parent) :
ui->warningLabel->setText(tr("Enter the old and new passphrase to the wallet."));
break;
}
-
textChanged();
connect(ui->passEdit1, SIGNAL(textChanged(QString)), this, SLOT(textChanged()));
connect(ui->passEdit2, SIGNAL(textChanged(QString)), this, SLOT(textChanged()));