summaryrefslogtreecommitdiff
path: root/sfx2/source
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source')
-rw-r--r--sfx2/source/control/recentdocsview.cxx8
-rw-r--r--sfx2/source/dialog/backingcomp.cxx14
-rw-r--r--sfx2/source/dialog/backingwindow.cxx4
3 files changed, 25 insertions, 1 deletions
diff --git a/sfx2/source/control/recentdocsview.cxx b/sfx2/source/control/recentdocsview.cxx
index 78733feafcd9..e815b9741e0b 100644
--- a/sfx2/source/control/recentdocsview.cxx
+++ b/sfx2/source/control/recentdocsview.cxx
@@ -53,6 +53,14 @@ RecentDocsView::RecentDocsView( Window* pParent )
SetStyle(GetStyle() | WB_VSCROLL);
setItemMaxTextLength( mnItemMaxTextLength );
setItemDimensions( mnItemMaxSize, mnItemMaxSize, mnTextHeight, mnItemPadding );
+
+ // Set prefered width so text lines will not be cut off
+ Font aOldFont(GetFont());
+ Font aNewFont(aOldFont);
+ aNewFont.SetHeight(20);
+ SetFont(aNewFont);
+ set_width_request(std::max(GetTextWidth(maWelcomeLine1),GetTextWidth(maWelcomeLine2)));
+ SetFont(aOldFont);
}
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeRecentDocsView(Window *pParent, VclBuilder::stringmap &)
diff --git a/sfx2/source/dialog/backingcomp.cxx b/sfx2/source/dialog/backingcomp.cxx
index 4a144981c6d0..023d426cd355 100644
--- a/sfx2/source/dialog/backingcomp.cxx
+++ b/sfx2/source/dialog/backingcomp.cxx
@@ -490,6 +490,20 @@ void SAL_CALL BackingComp::attachFrame( /*IN*/ const css::uno::Reference< css::f
if( pBack )
pBack->setOwningFrame( m_xFrame );
+ // Set a minimum size for Start Center
+ if( pParent && pBack )
+ {
+ long nMenuHeight = 0;
+ Window* pMenu = pParent->GetWindow(WINDOW_NEXT);
+ if( pMenu )
+ nMenuHeight = pMenu->GetSizePixel().Height();
+
+ pParent->SetMinOutputSizePixel(
+ Size(
+ pBack->get_width_request(),
+ pBack->get_height_request() + nMenuHeight));
+ }
+
/* } SAFE */
}
diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx
index 60ce65f25354..b02f3e3eb95b 100644
--- a/sfx2/source/dialog/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -258,6 +258,9 @@ void BackingWindow::initControls()
mpThinBox2->SetBackground(aButtonsText);
Resize();
+
+ set_width_request(mpAllRecentThumbnails->get_width_request() + mpAllButtonsBox->GetOptimalSize().Width());
+ set_height_request(mpAllButtonsBox->GetOptimalSize().Height());
}
void BackingWindow::setupButton( PushButton* pButton )
@@ -548,5 +551,4 @@ void BackingWindow::clearRecentFileList()
{
mpAllRecentThumbnails->Clear();
}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab:*/