1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Merge remote-tracking branch 'zetok/password-dialog'

This commit is contained in:
agilob 2015-10-13 20:31:01 +01:00
commit 726ebadaaa
No known key found for this signature in database
GPG Key ID: 296F0B764741106C
2 changed files with 11 additions and 21 deletions

View File

@ -26,14 +26,14 @@ const double SetPasswordDialog::reasonablePasswordLength = 8.;
SetPasswordDialog::SetPasswordDialog(QString body, QString extraButton, QWidget* parent)
: QDialog(parent)
, ui(new Ui::SetPasswordDialog)
, body(body+"\n")
, body(body + "\n\n")
{
ui->setupUi(this);
connect(ui-> passwordlineEdit, SIGNAL(textChanged(QString)), this, SLOT(onPasswordEdit()));
connect(ui->repasswordlineEdit, SIGNAL(textChanged(QString)), this, SLOT(onPasswordEdit()));
ui->body->setText(body + "\n" + tr("The passwords don't match."));
ui->body->setText(body + "\n\n");
ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false);
if (!extraButton.isEmpty())
@ -70,7 +70,7 @@ void SetPasswordDialog::onPasswordEdit()
ui->body->setText(body);
}
ui->strengthBar->setValue(getPasswordStrength(pswd));
ui->passStrengthMeter->setValue(getPasswordStrength(pswd));
}
int SetPasswordDialog::getPasswordStrength(QString pass)

View File

@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>325</width>
<width>255</width>
<height>160</height>
</rect>
</property>
@ -25,20 +25,20 @@
<item row="4" column="0">
<widget class="QLabel" name="label_2">
<property name="alignment">
<set>Qt::AlignRight</set>
<set>Qt::AlignLeft</set>
</property>
<property name="text">
<string>Repeat password</string>
<string>Confirm:</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label">
<property name="alignment">
<set>Qt::AlignRight</set>
<set>Qt::AlignLeft</set>
</property>
<property name="text">
<string>Type password</string>
<string>Password:</string>
</property>
</widget>
</item>
@ -56,23 +56,13 @@
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label_3">
<property name="alignment">
<set>Qt::AlignRight</set>
</property>
<property name="text">
<string>Password strength</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QProgressBar" name="strengthBar">
<item row="6" column="0" colspan="2">
<widget class="QProgressBar" name="passStrengthMeter">
<property name="value">
<number>0</number>
</property>
<property name="format">
<string/>
<string>Password strength: %p%</string>
</property>
</widget>
</item>