summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Dominguez <venccsralph@gmail.com>2012-06-11 21:55:20 -0430
committerRafael Dominguez <venccsralph@gmail.com>2012-06-11 21:55:20 -0430
commit99bd77af309f3fbb18c8acb5b862bd3c3291fa5d (patch)
tree03dd8e16cc0fe1def56047ab9e7eea1e103670bc
parentc935b5a30e80e25318c569b8a4d4eeb8eba16d94 (diff)
Fix displaying folder thumbnail.
Change-Id: Ibe9c64268e4034ddbfc30735846e2fe49449bcf5
-rw-r--r--sfx2/source/control/thumbnailview.cxx16
1 files changed, 11 insertions, 5 deletions
diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx
index bb5f8b9d6fb4..741804acbd00 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -1288,15 +1288,21 @@ void ThumbnailView::Populate ()
if (nEntries)
{
/// Preview first 2 thumbnails for folder
- Image aImg = lcl_fetchThumbnail(pTemplates->GetPath(i,0),96,96);
+ Image aImg = lcl_fetchThumbnail(pTemplates->GetPath(i,0),128,128);
if ( nEntries > 2 )
{
Color aWhite(COL_WHITE);
- BitmapEx aResult = lcl_fetchThumbnail(pTemplates->GetPath(i,1),96,96).GetBitmapEx();
- BitmapEx aBmp = aImg.GetBitmapEx();
- aResult.Expand(20,20,&aWhite,sal_True);
- aResult.CopyPixel(Rectangle(24,24,106,106),Rectangle(0,0,96,96),&aBmp);
+ BitmapEx aBmp = lcl_fetchThumbnail(pTemplates->GetPath(i,1),128,128).GetBitmapEx();
+ BitmapEx aResult = aBmp;
+
+ aResult.Erase(aWhite);
+ aBmp.Scale(Size(128,128));
+ aResult.CopyPixel(Rectangle(32,4,128,100),Rectangle(0,0,96,96),&aBmp);
+
+ aBmp = aImg.GetBitmapEx();
+ aBmp.Scale(Size(96,96));
+ aResult.CopyPixel(Rectangle(10,22,106,118), Rectangle(0,0,96,96),&aBmp);
aImg = aResult;