From 11548c523aedddfc6f43798c65b6362b6ede8949 Mon Sep 17 00:00:00 2001 From: Daniel Ramoeller Date: Sat, 20 Feb 2021 15:40:17 +0100 Subject: [PATCH] Adjust code preview spacing Partial fix of bug #12152. --- src/frontends/qt/GuiViewSource.cpp | 2 +- src/frontends/qt/ui/ViewSourceUi.ui | 162 +++++++++++++++------------- 2 files changed, 87 insertions(+), 77 deletions(-) diff --git a/src/frontends/qt/GuiViewSource.cpp b/src/frontends/qt/GuiViewSource.cpp index 310d24ea1b..f83e020e7e 100644 --- a/src/frontends/qt/GuiViewSource.cpp +++ b/src/frontends/qt/GuiViewSource.cpp @@ -359,7 +359,7 @@ void ViewSourceWidget::updateDefaultFormat(BufferView const & bv) void ViewSourceWidget::resizeEvent (QResizeEvent * event) { - QSize const & formSize = formLayout->sizeHint(); + QSize const & formSize = gridLayout->sizeHint(); // minimize the size of the part that contains the buttons if (width() * formSize.height() < height() * formSize.width()) { layout_->setDirection(QBoxLayout::TopToBottom); diff --git a/src/frontends/qt/ui/ViewSourceUi.ui b/src/frontends/qt/ui/ViewSourceUi.ui index c18b284cb9..bd4ddefab9 100644 --- a/src/frontends/qt/ui/ViewSourceUi.ui +++ b/src/frontends/qt/ui/ViewSourceUi.ui @@ -20,14 +20,26 @@ + + 0 + - 3 + 0 + + + 0 - 3 + 0 + + + 0 + + 0 + QLayout::SetMaximumSize @@ -57,65 +69,56 @@ - - - QLayout::SetDefaultConstraint - - - QFormLayout::ExpandingFieldsGrow - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - + + 6 - - 4 + + 6 + + + 6 + + + 6 + + + 6 - - - 3 + + + F&ormat: - - QLayout::SetMinAndMaxSize + + outputFormatCO - - 3 - - - - - F&ormat: - - - outputFormatCO - - - - - - - true - - - - 0 - 0 - - - - Select the output format - - - QComboBox::AdjustToContents - - - - + - + + + + Qt::Vertical + + + + 0 + 0 + + + + + + + + Automatic update + + + true + + + + @@ -131,26 +134,6 @@ - - - - Automatic update - - - true - - - - - - - false - - - &Update - - - @@ -181,6 +164,35 @@ + + + + false + + + &Update + + + + + + + true + + + + 0 + 0 + + + + Select the output format + + + QComboBox::AdjustToContents + + + @@ -189,8 +201,6 @@ viewSourceTV - autoUpdateCB - updatePB qt_i18n.h