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 | 152 +++++++++++++++------------- 2 files changed, 82 insertions(+), 72 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,81 +69,46 @@ - - - QLayout::SetDefaultConstraint + + + 6 - - QFormLayout::ExpandingFieldsGrow + + 6 - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + 6 - + 6 - - 4 + + 6 - - - 3 - - - QLayout::SetMinAndMaxSize + + + F&ormat: - - 3 + + outputFormatCO - - - - F&ormat: - - - outputFormatCO - - - - - - - true - - - - 0 - 0 - - - - Select the output format - - - QComboBox::AdjustToContents - - - - + - - - - - 0 - 0 - + + + + Qt::Vertical - - Show the source as the master document gets it - - - Master's perspective + + + 0 + 0 + - + - + Automatic update @@ -141,13 +118,19 @@ - - - - false + + + + + 0 + 0 + + + + Show the source as the master document gets it - &Update + Master's perspective @@ -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 -- 2.39.5