[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - sfx2/source

Zolnai Tamás tamas.zolnai at collabora.com
Thu Jan 9 05:26:14 PST 2014


 sfx2/source/control/recentdocsview.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit eea247993c6c06cad8c6b728c9b013b2c6e86dca
Author: Zolnai Tamás <tamas.zolnai at collabora.com>
Date:   Thu Jan 9 00:23:31 2014 +0100

    Startcenter: when screen is small make doc thumbails smaller
    
    (cherry picked from commit 42c1463b8914cf51dd778ff4b22c56e57a935ccf)
    
    Change-Id: If4fbb66992318221a687710afa77fc98e4f111c3
    Reviewed-on: https://gerrit.libreoffice.org/7331
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>
    Tested-by: Jan Holesovsky <kendy at collabora.com>

diff --git a/sfx2/source/control/recentdocsview.cxx b/sfx2/source/control/recentdocsview.cxx
index 912ae37..b083736 100644
--- a/sfx2/source/control/recentdocsview.cxx
+++ b/sfx2/source/control/recentdocsview.cxx
@@ -18,7 +18,7 @@
  */
 
 #include <sfx2/recentdocsview.hxx>
-
+#include <vcl/svapp.hxx>
 #include <sfx2/templateabstractview.hxx>
 #include <sfx2/app.hxx>
 #include <sfx2/sfx.hrc>
@@ -41,7 +41,6 @@ using namespace com::sun::star::beans;
 RecentDocsView::RecentDocsView( Window* pParent )
     : ThumbnailView(pParent)
     , mnFileTypes(TYPE_NONE)
-    , mnItemMaxSize(256)
     , mnTextHeight(30)
     , mnItemPadding(5)
     , mnItemMaxTextLength(30)
@@ -49,6 +48,8 @@ RecentDocsView::RecentDocsView( Window* pParent )
     , maWelcomeLine1(SfxResId(STR_WELCOME_LINE1))
     , maWelcomeLine2(SfxResId(STR_WELCOME_LINE2))
 {
+    Rectangle aScreen = Application::GetScreenPosSizePixel(Application::GetDisplayBuiltInScreen());
+    mnItemMaxSize = std::min(aScreen.GetWidth(),aScreen.GetHeight()) > 800 ? 256 : 192;
     SetStyle(GetStyle() | WB_VSCROLL);
     setItemMaxTextLength( mnItemMaxTextLength );
     setItemDimensions( mnItemMaxSize, mnItemMaxSize, mnTextHeight, mnItemPadding );


More information about the Libreoffice-commits mailing list