diff options
author | Jan Holesovsky <kendy@collabora.com> | 2014-08-01 15:13:34 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2014-08-01 15:25:02 +0200 |
commit | 2568a0bb72c404366ba1665f7ce005c4d3d36ec6 (patch) | |
tree | a0b319d4ac14ae03e94d65f959013155c165d4c0 /sfx2 | |
parent | b38b124b64b7a1f6529799552f6e89360edd8280 (diff) |
hidpi, startcenter: Don't set fixed font heigt in the startcenter.
Change-Id: I68efbd08d21b514ab1659cd6bddfc2c4788c4a74
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/control/recentdocsview.cxx | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/sfx2/source/control/recentdocsview.cxx b/sfx2/source/control/recentdocsview.cxx index 2ac85493d4d8..af1469cb012c 100644 --- a/sfx2/source/control/recentdocsview.cxx +++ b/sfx2/source/control/recentdocsview.cxx @@ -117,6 +117,13 @@ bool RecentDocsView::isAcceptedFile(const OUString &rURL) const (mnFileTypes & TYPE_OTHER && typeMatchesExtension(TYPE_OTHER, aExt)); } +void RecentDocsView::SetMessageFont() +{ + Font aFont(GetFont()); + aFont.SetHeight(aFont.GetHeight()*1.3); + SetFont(aFont); +} + BitmapEx RecentDocsView::getDefaultThumbnail(const OUString &rURL) { BitmapEx aImg; @@ -195,13 +202,11 @@ void RecentDocsView::Reload() Invalidate(); // Set preferred width - if( mFilteredItemList.empty() ) + if (mFilteredItemList.empty()) { Font aOldFont(GetFont()); - Font aNewFont(aOldFont); - aNewFont.SetHeight(20); - SetFont(aNewFont); - set_width_request(std::max(GetTextWidth(maWelcomeLine1),GetTextWidth(maWelcomeLine2))); + SetMessageFont(); + set_width_request(std::max(GetTextWidth(maWelcomeLine1), GetTextWidth(maWelcomeLine2))); SetFont(aOldFont); } else @@ -257,9 +262,7 @@ void RecentDocsView::Paint( const Rectangle &aRect ) { // No recent files to be shown yet. Show a welcome screen. Font aOldFont(GetFont()); - Font aNewFont(aOldFont); - aNewFont.SetHeight(20); - SetFont(aNewFont); + SetMessageFont(); long nTextHeight = GetTextHeight(); @@ -297,10 +300,8 @@ void RecentDocsView::LoseFocus() void RecentDocsView::Clear() { Font aOldFont(GetFont()); - Font aNewFont(aOldFont); - aNewFont.SetHeight(20); - SetFont(aNewFont); - set_width_request(std::max(GetTextWidth(maWelcomeLine1),GetTextWidth(maWelcomeLine2))); + SetMessageFont(); + set_width_request(std::max(GetTextWidth(maWelcomeLine1), GetTextWidth(maWelcomeLine2))); SetFont(aOldFont); ThumbnailView::Clear(); |