Kaydet (Commit) c4ecc15b authored tarafından Norbert Thiebaud's avatar Norbert Thiebaud

fast scale doubling of biptmap mess up mac retina but is needed otherwise

Change-Id: I3d4a4bbbd85719fbf1422d9397727dd73bd09f37
üst 29a95776
...@@ -1379,6 +1379,20 @@ void ToolBox::SetItemImage( sal_uInt16 nItemId, const Image& rImage ) ...@@ -1379,6 +1379,20 @@ void ToolBox::SetItemImage( sal_uInt16 nItemId, const Image& rImage )
{ {
Image aImage(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]; ImplToolItem* pItem = &mpData->m_aItems[nPos];
// Nur wenn alles berechnet ist, mehr Aufwand treiben // Nur wenn alles berechnet ist, mehr Aufwand treiben
if ( !mbCalc ) if ( !mbCalc )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment