vcl/inc/printdlg.hxx | 4 ++++ vcl/source/window/printdlg.cxx | 9 +++++++++ vcl/uiconfig/ui/printdialog.ui | 2 -- 3 files changed, 13 insertions(+), 2 deletions(-)
New commits: commit fa412876add97cab38d404723c49d35775f8efea Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Fri Jan 10 17:27:04 2020 +0000 Commit: Heiko Tietze <heiko.tie...@documentfoundation.org> CommitDate: Tue Jan 14 09:43:11 2020 +0100 Related: tdf#127782 resize the print dialog to its optimum size... after expander is activated Change-Id: I3f87243f0502829e048173987c8998898d351adf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86575 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tie...@documentfoundation.org> diff --git a/vcl/inc/printdlg.hxx b/vcl/inc/printdlg.hxx index 9facdcf9e620..4b6772a17eb8 100644 --- a/vcl/inc/printdlg.hxx +++ b/vcl/inc/printdlg.hxx @@ -186,6 +186,8 @@ namespace vcl std::unique_ptr<weld::CustomWeld> mxNupOrderWin; /// border around each page std::unique_ptr<weld::CheckButton> mxBorderCB; + std::unique_ptr<weld::Expander> mxRangeExpander; + std::unique_ptr<weld::Expander> mxLayoutExpander; std::unique_ptr<weld::Widget> mxCustom; OUString const maPrintToFileText; @@ -234,6 +236,8 @@ namespace vcl DECL_LINK( UIOption_SpinModifyHdl, weld::SpinButton&, void ); DECL_LINK( UIOption_EntryModifyHdl, weld::Entry&, void ); + DECL_LINK( ExpandHdl, weld::Expander&, void ); + css::beans::PropertyValue* getValueForWindow(weld::Widget*) const; void preparePreview( bool i_bMayUseCache ); diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index b42a1ce41213..cbba1ac3f562 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -566,6 +566,8 @@ PrintDialog::PrintDialog(weld::Window* i_pWindow, const std::shared_ptr<PrinterC , mxNupOrder(new ShowNupOrderWindow) , mxNupOrderWin(new weld::CustomWeld(*m_xBuilder, "orderpreview", *mxNupOrder)) , mxBorderCB(m_xBuilder->weld_check_button("bordercb")) + , mxRangeExpander(m_xBuilder->weld_expander("exRangeExpander")) + , mxLayoutExpander(m_xBuilder->weld_expander("exLayoutExpander")) , mxCustom(m_xBuilder->weld_widget("customcontents")) , maPrintToFileText( VclResId( SV_PRINT_TOFILE_TXT ) ) , maDefPrtText( VclResId( SV_PRINT_DEFPRT_TXT ) ) @@ -695,9 +697,16 @@ PrintDialog::PrintDialog(weld::Window* i_pWindow, const std::shared_ptr<PrinterC mxPageMarginEdt->connect_value_changed( LINK( this, PrintDialog, MetricSpinModifyHdl ) ); mxSheetMarginEdt->connect_value_changed( LINK( this, PrintDialog, MetricSpinModifyHdl ) ); + mxRangeExpander->connect_expanded(LINK( this, PrintDialog, ExpandHdl)); + mxLayoutExpander->connect_expanded(LINK( this, PrintDialog, ExpandHdl)); + updateNupFromPages(); } +IMPL_LINK_NOARG(PrintDialog, ExpandHdl, weld::Expander&, void) +{ + m_xDialog->resize_to_request(); +} PrintDialog::~PrintDialog() { diff --git a/vcl/uiconfig/ui/printdialog.ui b/vcl/uiconfig/ui/printdialog.ui index fc98a18a89a9..d4de5956f3cc 100644 --- a/vcl/uiconfig/ui/printdialog.ui +++ b/vcl/uiconfig/ui/printdialog.ui @@ -596,7 +596,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> @@ -875,7 +874,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"> <property name="visible">True</property> _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits