diff options
author | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-01-23 13:34:48 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2014-02-03 19:29:04 +0100 |
commit | ff86ddf59884ab3bd08e6bf33adabf8ca79967df (patch) | |
tree | f28e3a36a460be93a17dbb9cbcd3fd2b78645cbf /sfx2/source/dialog | |
parent | b010e8911cb2c72c57b76ff44892db67b30f2b5b (diff) |
Related fdo#65826: Set StartCenter's min width to display one column of docs
If there is document to display. Otherwise set minimum to the width
of greating background text.
Updating minimum size is needed only when the list is cleared.
Change-Id: Ic089571fd21d5ab9ded0f4cde7e1aa72fd508d32
Diffstat (limited to 'sfx2/source/dialog')
-rw-r--r-- | sfx2/source/dialog/backingcomp.cxx | 12 | ||||
-rw-r--r-- | sfx2/source/dialog/backingwindow.cxx | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/sfx2/source/dialog/backingcomp.cxx b/sfx2/source/dialog/backingcomp.cxx index 023d426cd355..f6dd7f06a665 100644 --- a/sfx2/source/dialog/backingcomp.cxx +++ b/sfx2/source/dialog/backingcomp.cxx @@ -850,7 +850,19 @@ void SAL_CALL BackingComp::dispatch( const css::util::URL& aURL, const css::uno: Window* pWindow = VCLUnoHelper::GetWindow(m_xWindow); BackingWindow* pBack = dynamic_cast<BackingWindow*>(pWindow ); if( pBack ) + { pBack->clearRecentFileList(); + + // Recalculate minimum width + css::uno::Reference< css::awt::XWindow > xParentWindow = m_xFrame->getContainerWindow(); + WorkWindow* pParent = (WorkWindow*)VCLUnoHelper::GetWindow(xParentWindow); + if( pParent ) + { + pParent->SetMinOutputSizePixel( Size( + pBack->get_width_request(), + pParent->GetMinOutputSizePixel().Height()) ); + } + } } } diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx index b02f3e3eb95b..a8114d67858b 100644 --- a/sfx2/source/dialog/backingwindow.cxx +++ b/sfx2/source/dialog/backingwindow.cxx @@ -550,5 +550,6 @@ Size BackingWindow::GetOptimalSize() const void BackingWindow::clearRecentFileList() { mpAllRecentThumbnails->Clear(); + set_width_request(mpAllRecentThumbnails->get_width_request() + mpAllButtonsBox->GetOptimalSize().Width()); } /* vim:set shiftwidth=4 softtabstop=4 expandtab:*/ |