[PATCH libreoffice-4-0] Make template thumbnail sizes appropiate to the content in t...

Rafael Dominguez (via Code Review) gerrit at gerrit.libreoffice.org
Sun Apr 7 11:52:53 PDT 2013


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/3253

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/53/3253/1

Make template thumbnail sizes appropiate to the content in them.

Change-Id: I785a351a5a936a42b56081a868c01d97e0a6105f
---
M sfx2/inc/sfx2/templateabstractview.hxx
M sfx2/source/doc/templatedlg.cxx
2 files changed, 5 insertions(+), 2 deletions(-)



diff --git a/sfx2/inc/sfx2/templateabstractview.hxx b/sfx2/inc/sfx2/templateabstractview.hxx
index a60fdb3..f14efad 100644
--- a/sfx2/inc/sfx2/templateabstractview.hxx
+++ b/sfx2/inc/sfx2/templateabstractview.hxx
@@ -17,11 +17,14 @@
 
 //template thumbnail item defines
 #define TEMPLATE_ITEM_MAX_WIDTH 160
-#define TEMPLATE_ITEM_MAX_HEIGHT 160
+#define TEMPLATE_ITEM_MAX_HEIGHT 140
 #define TEMPLATE_ITEM_PADDING 5
 #define TEMPLATE_ITEM_MAX_TEXT_LENGTH 20
 #define TEMPLATE_ITEM_THUMBNAIL_MAX_HEIGHT 88
 
+//template thumbnail height with a subtitle
+#define TEMPLATE_ITEM_MAX_HEIGHT_SUB 160
+
 //template thumbnail image defines
 #define TEMPLATE_THUMBNAIL_MAX_HEIGHT TEMPLATE_ITEM_THUMBNAIL_MAX_HEIGHT - 2*TEMPLATE_ITEM_PADDING
 #define TEMPLATE_THUMBNAIL_MAX_WIDTH TEMPLATE_ITEM_MAX_WIDTH - 2*TEMPLATE_ITEM_PADDING
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 05dd022..94bbea6 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -225,7 +225,7 @@
     mpSearchView->setItemMaxTextLength(TEMPLATE_ITEM_MAX_TEXT_LENGTH);
 
     mpSearchView->setItemDimensions(TEMPLATE_ITEM_MAX_WIDTH,TEMPLATE_ITEM_THUMBNAIL_MAX_HEIGHT,
-                                    TEMPLATE_ITEM_MAX_HEIGHT-TEMPLATE_ITEM_THUMBNAIL_MAX_HEIGHT,
+                                    TEMPLATE_ITEM_MAX_HEIGHT_SUB-TEMPLATE_ITEM_THUMBNAIL_MAX_HEIGHT,
                                     TEMPLATE_ITEM_PADDING);
 
     mpSearchView->setItemStateHdl(LINK(this,SfxTemplateManagerDlg,TVItemStateHdl));

-- 
To view, visit https://gerrit.libreoffice.org/3253
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I785a351a5a936a42b56081a868c01d97e0a6105f
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-4-0
Gerrit-Owner: Rafael Dominguez <venccsralph at gmail.com>



More information about the LibreOffice mailing list