From ee1268c518243f7f1eccaeab7bee4d833be1e0bb Mon Sep 17 00:00:00 2001 From: Jonathan White Date: Fri, 27 Jan 2023 07:38:25 -0500 Subject: [PATCH] Fix spacing of QGroupBox's * Previously our base style sheet added roughly 20px of margin to the top and bottom of all QGroupBox. This caused visual errors where that margin was not needed/desired. * Transferred padding to the specific layouts instead where it belongs. --- src/gui/ApplicationSettingsWidgetGeneral.ui | 20 ++----------------- src/gui/ApplicationSettingsWidgetSecurity.ui | 3 +++ src/gui/PasswordGeneratorWidget.ui | 3 +++ .../DatabaseSettingsWidgetBrowser.ui | 6 ++++++ .../DatabaseSettingsWidgetDatabaseKey.cpp | 2 ++ .../DatabaseSettingsWidgetGeneral.ui | 3 +++ .../DatabaseSettingsWidgetMaintenance.ui | 3 +++ src/gui/styles/base/basestyle.qss | 4 +--- 8 files changed, 23 insertions(+), 21 deletions(-) diff --git a/src/gui/ApplicationSettingsWidgetGeneral.ui b/src/gui/ApplicationSettingsWidgetGeneral.ui index 53bf9f724..0270c52d2 100644 --- a/src/gui/ApplicationSettingsWidgetGeneral.ui +++ b/src/gui/ApplicationSettingsWidgetGeneral.ui @@ -7,7 +7,7 @@ 0 0 605 - 968 + 969 @@ -64,7 +64,7 @@ - 0 + 20 0 @@ -944,22 +944,6 @@ - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 10 - - - - diff --git a/src/gui/ApplicationSettingsWidgetSecurity.ui b/src/gui/ApplicationSettingsWidgetSecurity.ui index 10d353e11..6dc122b80 100644 --- a/src/gui/ApplicationSettingsWidgetSecurity.ui +++ b/src/gui/ApplicationSettingsWidgetSecurity.ui @@ -11,6 +11,9 @@ + + 20 + 0 diff --git a/src/gui/PasswordGeneratorWidget.ui b/src/gui/PasswordGeneratorWidget.ui index 642129de6..250f13038 100644 --- a/src/gui/PasswordGeneratorWidget.ui +++ b/src/gui/PasswordGeneratorWidget.ui @@ -208,6 +208,9 @@ QProgressBar::chunk { Password + + 10 + diff --git a/src/gui/dbsettings/DatabaseSettingsWidgetBrowser.ui b/src/gui/dbsettings/DatabaseSettingsWidgetBrowser.ui index 7d6dc00d2..f33421075 100644 --- a/src/gui/dbsettings/DatabaseSettingsWidgetBrowser.ui +++ b/src/gui/dbsettings/DatabaseSettingsWidgetBrowser.ui @@ -23,6 +23,9 @@ + + 20 + 0 @@ -88,6 +91,9 @@ 0 + + Convert legacy KeePassHTTP attributes to KeePassXC-Browser compatible custom data + Disconnect all browsers diff --git a/src/gui/dbsettings/DatabaseSettingsWidgetDatabaseKey.cpp b/src/gui/dbsettings/DatabaseSettingsWidgetDatabaseKey.cpp index 2dae5cbb5..50e757bc4 100644 --- a/src/gui/dbsettings/DatabaseSettingsWidgetDatabaseKey.cpp +++ b/src/gui/dbsettings/DatabaseSettingsWidgetDatabaseKey.cpp @@ -48,6 +48,7 @@ DatabaseSettingsWidgetDatabaseKey::DatabaseSettingsWidgetDatabaseKey(QWidget* pa { auto* vbox = new QVBoxLayout(this); vbox->setSizeConstraint(QLayout::SetMinimumSize); + vbox->setSpacing(20); // primary password option vbox->addWidget(m_passwordEditWidget); @@ -59,6 +60,7 @@ DatabaseSettingsWidgetDatabaseKey::DatabaseSettingsWidgetDatabaseKey(QWidget* pa vbox->setSizeConstraint(QLayout::SetMinimumSize); m_additionalKeyOptions->setLayout(new QVBoxLayout()); m_additionalKeyOptions->layout()->setMargin(0); + m_additionalKeyOptions->layout()->setSpacing(20); m_additionalKeyOptions->layout()->addWidget(m_keyFileEditWidget); #ifdef WITH_XC_YUBIKEY m_additionalKeyOptions->layout()->addWidget(m_yubiKeyEditWidget); diff --git a/src/gui/dbsettings/DatabaseSettingsWidgetGeneral.ui b/src/gui/dbsettings/DatabaseSettingsWidgetGeneral.ui index 952b444b1..ab6d88c72 100644 --- a/src/gui/dbsettings/DatabaseSettingsWidgetGeneral.ui +++ b/src/gui/dbsettings/DatabaseSettingsWidgetGeneral.ui @@ -23,6 +23,9 @@ + + 20 + 0 diff --git a/src/gui/dbsettings/DatabaseSettingsWidgetMaintenance.ui b/src/gui/dbsettings/DatabaseSettingsWidgetMaintenance.ui index e1d06f6f5..d5824e67b 100644 --- a/src/gui/dbsettings/DatabaseSettingsWidgetMaintenance.ui +++ b/src/gui/dbsettings/DatabaseSettingsWidgetMaintenance.ui @@ -23,6 +23,9 @@ + + 20 + 0 diff --git a/src/gui/styles/base/basestyle.qss b/src/gui/styles/base/basestyle.qss index 2c98c4808..feba71fdb 100644 --- a/src/gui/styles/base/basestyle.qss +++ b/src/gui/styles/base/basestyle.qss @@ -48,13 +48,11 @@ DatabaseOpenWidget #centralStack { } QGroupBox { - margin-top: 1.4em; - margin-bottom: 1.4em; font-weight: bold; } QGroupBox::title { - margin-top: -3.35em; + margin-top: -.4em; margin-left: -.4em; subcontrol-origin: padding; }