diff options
author | Rafael Dominguez <venccsralph@gmail.com> | 2012-08-07 18:07:51 -0430 |
---|---|---|
committer | Rafael Dominguez <venccsralph@gmail.com> | 2012-08-08 10:25:52 -0430 |
commit | 7ec0e8838a25adf0f228e94d75c635905989c872 (patch) | |
tree | f356a9af921226dfc2049251b576362b89701919 | |
parent | 91c50153889e32aa5ed796f082c594d9f17c9b31 (diff) |
Scale down template thumbnail subtitle.
Change-Id: I6dea3ae4800a645ac6a187ff99c5fb10513043c8
-rw-r--r-- | sfx2/source/control/templateviewitem.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sfx2/source/control/templateviewitem.cxx b/sfx2/source/control/templateviewitem.cxx index 01041a9e4b16..4b559d315877 100644 --- a/sfx2/source/control/templateviewitem.cxx +++ b/sfx2/source/control/templateviewitem.cxx @@ -19,6 +19,8 @@ #include <drawinglayer/processor2d/baseprocessor2d.hxx> #include <vcl/button.hxx> +#define SUBTITLE_SCALE_FACTOR 0.85 + using namespace basegfx; using namespace basegfx::tools; using namespace drawinglayer::attribute; @@ -52,7 +54,8 @@ void TemplateViewItem::calculateItemsPosition(sal_uInt32 nMaxTextLength) // Set subtitle position maSubTitlePos.setY(maTextPos.getY() + nSpace); - maSubTitlePos.setX(maDrawArea.Left() + (aRectSize.Width() - aTextDev.getTextWidth(maSubTitle,0,nMaxTextLength))/2); + maSubTitlePos.setX(maDrawArea.Left() + + (aRectSize.Width() - aTextDev.getTextWidth(maSubTitle,0,nMaxTextLength)*SUBTITLE_SCALE_FACTOR)/2); } } @@ -101,7 +104,7 @@ void TemplateViewItem::Paint(drawinglayer::processor2d::BaseProcessor2D *pProces if (!maSubTitle.isEmpty()) { basegfx::B2DHomMatrix aSubTitleMatrix( createScaleTranslateB2DHomMatrix( - pAttrs->aFontSize.getX(), pAttrs->aFontSize.getY(), + pAttrs->aFontSize.getX()*SUBTITLE_SCALE_FACTOR, pAttrs->aFontSize.getY()*SUBTITLE_SCALE_FACTOR, double( maSubTitlePos.X() ), double( maSubTitlePos.Y() ) ) ); aSeq[3] = Primitive2DReference( |