commit c13c95997402ae9c82ba3e5a13aac8006ff13476 Author: Daniel Ramoeller <d....@web.de> Date: Thu Jun 15 07:18:31 2023 +0200
Fix margins and spacing of InsetParamsUI Fix for bug #12244. --- src/frontends/qt/InsetParamsDialog.cpp | 4 ++ src/frontends/qt/ui/InsetParamsUi.ui | 73 +++++++++++++++---------------- 2 files changed, 39 insertions(+), 38 deletions(-) diff --git a/src/frontends/qt/InsetParamsDialog.cpp b/src/frontends/qt/InsetParamsDialog.cpp index d2c0cae..67cbfdd 100644 --- a/src/frontends/qt/InsetParamsDialog.cpp +++ b/src/frontends/qt/InsetParamsDialog.cpp @@ -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() diff --git a/src/frontends/qt/ui/InsetParamsUi.ui b/src/frontends/qt/ui/InsetParamsUi.ui index af6312f..c7e6ee1 100644 --- a/src/frontends/qt/ui/InsetParamsUi.ui +++ b/src/frontends/qt/ui/InsetParamsUi.ui @@ -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,31 +17,41 @@ <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"> <string>Update dialog when moving context</string> @@ -66,31 +76,18 @@ </item> </layout> </item> - <item row="2" column="0" colspan="2"> - <layout class="QHBoxLayout"> - <property name="spacing"> - <number>6</number> - </property> - <property name="leftMargin"> - <number>0</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>0</number> + <item row="1" column="0"> + <spacer name="verticalSpacer"> + <property name="orientation"> + <enum>Qt::Vertical</enum> </property> - <property name="bottomMargin"> - <number>0</number> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>10</height> + </size> </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> -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs