From c13c95997402ae9c82ba3e5a13aac8006ff13476 Mon Sep 17 00:00:00 2001 From: Daniel Ramoeller Date: Thu, 15 Jun 2023 07:18:31 +0200 Subject: [PATCH] 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 d2c0cae45d..67cbfdd94e 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 af6312f1c4..c7e6ee1b49 100644 --- a/src/frontends/qt/ui/InsetParamsUi.ui +++ b/src/frontends/qt/ui/InsetParamsUi.ui @@ -7,7 +7,7 @@ 0 0 484 - 108 + 104 @@ -17,30 +17,40 @@ Inset Parameter Configuration - + + 12 + + - 0 + 1 - - - - Qt::Horizontal + + + + QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::Reset - - - 31 - 31 - - - + - + + + + + Qt::Horizontal + + + + 0 + 0 + + + + @@ -66,31 +76,18 @@ - - - - 6 - - - 0 - - - 0 - - - 0 + + + + Qt::Vertical - - 0 + + + 20 + 10 + - - - - QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::Reset - - - - + -- 2.39.5