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.
This commit is contained in:
Jonathan White 2023-01-27 07:38:25 -05:00
parent d78a6b6095
commit ee1268c518
8 changed files with 23 additions and 21 deletions

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>605</width>
<height>968</height>
<height>969</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3" stretch="0">
@ -64,7 +64,7 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout_8">
<property name="spacing">
<number>0</number>
<number>20</number>
</property>
<property name="leftMargin">
<number>0</number>
@ -944,22 +944,6 @@
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" name="resetSettingsSubLayout">
<property name="spacing">

View File

@ -11,6 +11,9 @@
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>20</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>

View File

@ -208,6 +208,9 @@ QProgressBar::chunk {
<string>Password</string>
</attribute>
<layout class="QGridLayout" name="_2">
<property name="verticalSpacing">
<number>10</number>
</property>
<item row="0" column="0">
<layout class="QHBoxLayout" name="passwordLengthSliderLayout">
<property name="spacing">

View File

@ -23,6 +23,9 @@
</size>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>20</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
@ -88,6 +91,9 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Convert legacy KeePassHTTP attributes to KeePassXC-Browser compatible custom data</string>
</property>
<property name="text">
<string>Disconnect all browsers</string>
</property>

View File

@ -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);

View File

@ -23,6 +23,9 @@
</size>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>20</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>

View File

@ -23,6 +23,9 @@
</size>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>20</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>

View File

@ -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;
}