summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2016-10-27 18:04:46 +0200
committerTomaž Vajngerl <quikee@gmail.com>2016-10-29 18:14:23 +0000
commit484390a09624f68a8dec01eb5bf06e84cdcb80f6 (patch)
tree785861f4ea5748754832b7e513a9b24e9f3d88d7 /sw
parent5bb5463efefc4d65e3434b37618cb74a1fe2a598 (diff)
HiDPI: remove unneeded image scaling when HiDPI is enabled
We don't need to scale images for HiDPI mode anymore - this is now done automatically when the image is loaded. Change-Id: Ie285cf4d672f4c098a468d3f7560ee2700365b92 Reviewed-on: https://gerrit.libreoffice.org/30340 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/utlui/content.cxx12
-rw-r--r--sw/source/uibase/utlui/viewlayoutctrl.cxx24
2 files changed, 0 insertions, 36 deletions
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index 28d2711f3321..0693c909f152 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -1521,18 +1521,6 @@ void SwContentTree::Display( bool bActive )
if(!m_bIsImageListInitialized)
{
m_aEntryImages = ImageList(SW_RES(IMG_NAVI_ENTRYBMP));
-
- if ( GetDPIScaleFactor() > 1 )
- {
- for (short i = 0; i < m_aEntryImages.GetImageCount(); i++)
- {
- OUString rImageName = m_aEntryImages.GetImageName(i);
- BitmapEx b = m_aEntryImages.GetImage(rImageName).GetBitmapEx();
- //Use Lanczos because it looks better with circles / diagonals
- b.Scale(GetDPIScaleFactor(), GetDPIScaleFactor(), BmpScaleFlag::Lanczos);
- m_aEntryImages.ReplaceImage(rImageName, Image(b));
- }
- }
m_bIsImageListInitialized = true;
}
// First read the selected entry to select it later again if necessary
diff --git a/sw/source/uibase/utlui/viewlayoutctrl.cxx b/sw/source/uibase/utlui/viewlayoutctrl.cxx
index 0531e0432f8e..6f0b5be487f4 100644
--- a/sw/source/uibase/utlui/viewlayoutctrl.cxx
+++ b/sw/source/uibase/utlui/viewlayoutctrl.cxx
@@ -51,30 +51,6 @@ SwViewLayoutControl::SwViewLayoutControl( sal_uInt16 _nSlotId, sal_uInt16 _nId,
mpImpl->maImageAutomatic_Active = Image( SW_RES(IMG_VIEWLAYOUT_AUTOMATIC_ACTIVE) );
mpImpl->maImageBookMode = Image( SW_RES(IMG_VIEWLAYOUT_BOOKMODE) );
mpImpl->maImageBookMode_Active = Image( SW_RES(IMG_VIEWLAYOUT_BOOKMODE_ACTIVE) );
-
- sal_Int32 nScaleFactor = rStatusBar.GetDPIScaleFactor();
- if (nScaleFactor != 1)
- {
- Image arr[6] = {mpImpl->maImageSingleColumn, mpImpl->maImageSingleColumn_Active,
- mpImpl->maImageAutomatic, mpImpl->maImageAutomatic_Active,
- mpImpl->maImageBookMode, mpImpl->maImageBookMode_Active};
-
- for (Image & i : arr)
- {
- BitmapEx aBitmap = i.GetBitmapEx();
- aBitmap.Scale(nScaleFactor, nScaleFactor, BmpScaleFlag::Fast);
- i = Image(aBitmap);
- }
-
- mpImpl->maImageSingleColumn = arr[0];
- mpImpl->maImageSingleColumn_Active = arr[1];
-
- mpImpl->maImageAutomatic = arr[2];
- mpImpl->maImageAutomatic_Active = arr[3];
-
- mpImpl->maImageBookMode = arr[4];
- mpImpl->maImageBookMode_Active = arr[5];
- }
}
SwViewLayoutControl::~SwViewLayoutControl()