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