Fix margins and spacing of InsetParamsUI

Fix for bug #12244.
This commit is contained in:
Daniel Ramoeller 2023-06-15 07:18:31 +02:00 committed by Scott Kostyshak
parent 96e5ca81c0
commit c13c959974
2 changed files with 39 additions and 38 deletions

View File

@ -80,6 +80,8 @@ InsetParamsDialog::InsetParamsDialog(GuiView & lv, InsetParamsWidget * widget)
widget->dialogTitle()), d(new Private)
{
setupUi(this);
// Remove margins since the widget is embedded in dialog which provides them
widget->layout()->setContentsMargins(0, 0, 0, 0);
setInsetParamsWidget(widget);
immediateApplyCB->setChecked(false);
synchronizedCB->setChecked(true);
@ -87,6 +89,8 @@ InsetParamsDialog::InsetParamsDialog(GuiView & lv, InsetParamsWidget * widget)
setFocusProxy(widget);
newPB = buttonBox->addButton(qt_("Ne&w Inset"),
QDialogButtonBox::ActionRole);
// fix height to minimum
setFixedHeight(sizeHint().height());
}
InsetParamsDialog::~InsetParamsDialog()

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>484</width>
<height>108</height>
<height>104</height>
</rect>
</property>
<property name="focusPolicy">
@ -17,30 +17,40 @@
<string>Inset Parameter Configuration</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0" colspan="2">
<property name="verticalSpacing">
<number>12</number>
</property>
<item row="0" column="0">
<widget class="QStackedWidget" name="stackedWidget">
<property name="currentIndex">
<number>0</number>
<number>1</number>
</property>
<widget class="QWidget" name="page"/>
<widget class="QWidget" name="page_2"/>
</widget>
</item>
<item row="1" column="0">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
<item row="3" column="0">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::Reset</set>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>31</width>
<height>31</height>
</size>
</property>
</spacer>
</widget>
</item>
<item row="1" column="1">
<item row="2" column="0">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QCheckBox" name="synchronizedCB">
<property name="toolTip">
@ -66,31 +76,18 @@
</item>
</layout>
</item>
<item row="2" column="0" colspan="2">
<layout class="QHBoxLayout">
<property name="spacing">
<number>6</number>
<item row="1" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="leftMargin">
<number>0</number>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>10</height>
</size>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::Reset</set>
</property>
</widget>
</item>
</layout>
</spacer>
</item>
</layout>
</widget>