mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
parent
9521f63b3a
commit
db0b659a53
@ -322,6 +322,7 @@ void DatabaseOpenWidget::openDatabase()
|
||||
auto btn = msgBox->addButton(tr("Open database anyway"), QMessageBox::ButtonRole::AcceptRole);
|
||||
msgBox->setDefaultButton(btn);
|
||||
msgBox->addButton(QMessageBox::Cancel);
|
||||
msgBox->layout()->setSizeConstraint(QLayout::SetMinimumSize);
|
||||
msgBox->exec();
|
||||
if (msgBox->clickedButton() != btn) {
|
||||
m_db.reset(new Database());
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "MessageBox.h"
|
||||
|
||||
#include <QCheckBox>
|
||||
#include <QLayout>
|
||||
#include <QMap>
|
||||
#include <QPushButton>
|
||||
#include <QWindow>
|
||||
@ -126,6 +127,7 @@ MessageBox::Button MessageBox::messageBox(QWidget* parent,
|
||||
msgBox.activateWindow();
|
||||
msgBox.raise();
|
||||
}
|
||||
msgBox.layout()->setSizeConstraint(QLayout::SetMinimumSize);
|
||||
msgBox.exec();
|
||||
|
||||
Button returnButton = m_addedButtonLookup[msgBox.clickedButton()];
|
||||
|
@ -168,6 +168,7 @@ bool DatabaseSettingsWidgetDatabaseKey::save()
|
||||
auto btn = msgBox->addButton(tr("Continue without password"), QMessageBox::ButtonRole::AcceptRole);
|
||||
msgBox->addButton(QMessageBox::Cancel);
|
||||
msgBox->setDefaultButton(QMessageBox::Cancel);
|
||||
msgBox->layout()->setSizeConstraint(QLayout::SetMinimumSize);
|
||||
msgBox->exec();
|
||||
if (msgBox->clickedButton() != btn) {
|
||||
return false;
|
||||
|
@ -287,6 +287,7 @@ bool DatabaseSettingsWidgetEncryption::save()
|
||||
auto ok = warning.addButton(tr("Understood, keep number"), QMessageBox::ButtonRole::AcceptRole);
|
||||
auto cancel = warning.addButton(tr("Cancel"), QMessageBox::ButtonRole::RejectRole);
|
||||
warning.setDefaultButton(cancel);
|
||||
warning.layout()->setSizeConstraint(QLayout::SetMinimumSize);
|
||||
warning.exec();
|
||||
if (warning.clickedButton() != ok) {
|
||||
return false;
|
||||
@ -300,6 +301,7 @@ bool DatabaseSettingsWidgetEncryption::save()
|
||||
auto ok = warning.addButton(tr("Understood, keep number"), QMessageBox::ButtonRole::AcceptRole);
|
||||
auto cancel = warning.addButton(tr("Cancel"), QMessageBox::ButtonRole::RejectRole);
|
||||
warning.setDefaultButton(cancel);
|
||||
warning.layout()->setSizeConstraint(QLayout::SetMinimumSize);
|
||||
warning.exec();
|
||||
if (warning.clickedButton() != ok) {
|
||||
return false;
|
||||
|
@ -17,10 +17,6 @@ QSpinBox {
|
||||
min-width: 90px;
|
||||
}
|
||||
|
||||
QDialogButtonBox QPushButton {
|
||||
min-width: 55px;
|
||||
}
|
||||
|
||||
QCheckBox, QRadioButton {
|
||||
spacing: 10px;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user