summaryrefslogtreecommitdiff
path: root/sfx2/source/control/recentdocsview.cxx
diff options
context:
space:
mode:
authorZolnai Tamás <tamas.zolnai@collabora.com>2014-01-17 20:10:06 +0100
committerJan Holesovsky <kendy@collabora.com>2014-02-03 19:28:16 +0100
commitb010e8911cb2c72c57b76ff44892db67b30f2b5b (patch)
treec854ca753b800fdf205440d3a7c9e204055dddae /sfx2/source/control/recentdocsview.cxx
parent17593b3e00c4d73a1985dfc1fae976d211aee007 (diff)
fdo#65826 and fdo#73605: set a minimum size to start center
This minimum size calculated like this: width: sidebar optimal width + width of text appearing in the thumbnail view when no recent document is available. height: menu width + optimal width of GtkBox containing buttons. Change-Id: Ic1fd6e33a1ec93e61318af02c09ee88909a76cf4 Reviewed-on: https://gerrit.libreoffice.org/7505 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2/source/control/recentdocsview.cxx')
-rw-r--r--sfx2/source/control/recentdocsview.cxx8
1 files changed, 8 insertions, 0 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 &)