[Libreoffice-commits] core.git: vcl/inc vcl/source vcl/uiconfig
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Tue Nov 10 20:06:45 UTC 2020
vcl/inc/printdlg.hxx | 1 +
vcl/source/window/printdlg.cxx | 6 ++++++
vcl/uiconfig/ui/printdialog.ui | 4 +---
3 files changed, 8 insertions(+), 3 deletions(-)
New commits:
commit c44155d3f8bc2037a41d221463d460138b3ecdf9
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Nov 10 17:33:20 2020 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Nov 10 21:06:04 2020 +0100
lock print dialog height so expanders don't expand the dialog
but instead can make use of the scrolledwindow
Change-Id: I9a820e077dce8090e6c5d876874dc1babbbd6808
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105565
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/inc/printdlg.hxx b/vcl/inc/printdlg.hxx
index 43760bab815c..1832e6da35b5 100644
--- a/vcl/inc/printdlg.hxx
+++ b/vcl/inc/printdlg.hxx
@@ -115,6 +115,7 @@ namespace vcl
std::shared_ptr<PrinterController> maPController;
std::unique_ptr<weld::Notebook> mxTabCtrl;
+ std::unique_ptr<weld::ScrolledWindow> mxScrolledWindow;
std::unique_ptr<weld::Frame> mxPageLayoutFrame;
std::unique_ptr<weld::ComboBox> mxPrinters;
std::unique_ptr<weld::Label> mxStatusTxt;
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 8e970bfc0154..e137a2f31eb2 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -491,6 +491,7 @@ PrintDialog::PrintDialog(weld::Window* i_pWindow, const std::shared_ptr<PrinterC
: GenericDialogController(i_pWindow, "vcl/ui/printdialog.ui", "PrintDialog")
, maPController( i_rController )
, mxTabCtrl(m_xBuilder->weld_notebook("tabcontrol"))
+ , mxScrolledWindow(m_xBuilder->weld_scrolled_window("scrolledwindow"))
, mxPageLayoutFrame(m_xBuilder->weld_frame("layoutframe"))
, mxPrinters(m_xBuilder->weld_combo_box("printersbox"))
, mxStatusTxt(m_xBuilder->weld_label("status"))
@@ -678,6 +679,11 @@ PrintDialog::PrintDialog(weld::Window* i_pWindow, const std::shared_ptr<PrinterC
mxLayoutExpander->connect_expanded(LINK( this, PrintDialog, ExpandHdl));
updateNupFromPages();
+
+ // lock the dialog height, regardless of later expander state
+ mxScrolledWindow->set_size_request(
+ mxScrolledWindow->get_preferred_size().Width() + mxScrolledWindow->get_vscroll_width(),
+ mxScrolledWindow->get_preferred_size().Height());
}
IMPL_LINK_NOARG(PrintDialog, ExpandHdl, weld::Expander&, void)
diff --git a/vcl/uiconfig/ui/printdialog.ui b/vcl/uiconfig/ui/printdialog.ui
index 5988ede3a8fc..ffcf04f6fda4 100644
--- a/vcl/uiconfig/ui/printdialog.ui
+++ b/vcl/uiconfig/ui/printdialog.ui
@@ -348,7 +348,7 @@
<property name="margin_left">6</property>
<property name="vexpand">True</property>
<child>
- <object class="GtkScrolledWindow">
+ <object class="GtkScrolledWindow" id="scrolledwindow">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">never</property>
@@ -635,7 +635,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
- <property name="resize_toplevel">True</property>
<child>
<object class="GtkGrid" id="gdCopiesExtra">
<property name="visible">True</property>
@@ -982,7 +981,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
- <property name="resize_toplevel">True</property>
<child>
<object class="GtkGrid" id="expandpagegrid">
<property name="visible">True</property>
More information about the Libreoffice-commits
mailing list