summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/printdlg.hxx4
-rw-r--r--vcl/source/window/printdlg.cxx9
-rw-r--r--vcl/uiconfig/ui/printdialog.ui2
3 files changed, 13 insertions, 2 deletions
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>