summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2014-02-13 11:43:39 -0600
committerNorbert Thiebaud <nthiebaud@gmail.com>2014-02-13 15:13:32 -0600
commitc4ecc15b2515ac8873099ded82b1e69f54187444 (patch)
tree2f75dbe619b8f3078c6c8cb39344dae41b126e72 /vcl
parent29a95776c3151e679bb8e5224cf4268c36859bbc (diff)
fast scale doubling of biptmap mess up mac retina but is needed otherwise
Change-Id: I3d4a4bbbd85719fbf1422d9397727dd73bd09f37
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/toolbox2.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index 9f6a1afc8b20..00b11d82cc6d 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -1379,6 +1379,20 @@ void ToolBox::SetItemImage( sal_uInt16 nItemId, const Image& rImage )
{
Image aImage(rImage);
+#ifndef MACOSX
+ if ( GetDPIScaleFactor() > 1)
+ {
+ BitmapEx aBitmap(aImage.GetBitmapEx());
+
+ // Some code calls this twice, so add a sanity check
+ // FIXME find out what that code is & fix accordingly
+ if (aBitmap.GetSizePixel().Width() < 32)
+ {
+ aBitmap.Scale(GetDPIScaleFactor(), GetDPIScaleFactor(), BMP_SCALE_FAST);
+ aImage = Image(aBitmap);
+ }
+ }
+#endif
ImplToolItem* pItem = &mpData->m_aItems[nPos];
// Nur wenn alles berechnet ist, mehr Aufwand treiben
if ( !mbCalc )