summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorKeith Curtis <keithcu@gmail.com>2013-12-20 14:19:19 +0100
committerJan Holesovsky <kendy@collabora.com>2013-12-20 14:23:35 +0100
commit7347482cc360ad3dc9ed77047441c2e30476fed3 (patch)
tree7f56a9063dea777562d797ae720cd58d2b4e7de4 /cui
parenta130de7e00bb426b15ec3b0ffc6bffc652d174ab (diff)
hidpi: Make many places Hi-DPI aware.
This also introduces a getter for the mnDPIScaleFactor variable. Change-Id: I02ba6858fb1842f911d62976f4c54afc3bfa337f
Diffstat (limited to 'cui')
-rw-r--r--cui/source/tabpages/align.cxx12
-rw-r--r--cui/source/tabpages/border.cxx22
2 files changed, 31 insertions, 3 deletions
diff --git a/cui/source/tabpages/align.cxx b/cui/source/tabpages/align.cxx
index 9aa47e8566dc..5ba830af9521 100644
--- a/cui/source/tabpages/align.cxx
+++ b/cui/source/tabpages/align.cxx
@@ -322,6 +322,18 @@ void AlignmentTabPage::InitVsRefEgde()
ResId aResId( IL_LOCK_BMPS, CUI_MGR() );
ImageList aImageList( aResId );
+
+ if( GetDPIScaleFactor() > 1 )
+ {
+ for (short i = 0; i < aImageList.GetImageCount(); i++)
+ {
+ OUString rImageName = aImageList.GetImageName(i);
+ BitmapEx b = aImageList.GetImage(rImageName).GetBitmapEx();
+ b.Scale(GetDPIScaleFactor(), GetDPIScaleFactor(), BMP_SCALE_FAST);
+ aImageList.ReplaceImage(rImageName, Image(b));
+ }
+ }
+
Size aItemSize( aImageList.GetImage( IID_BOTTOMLOCK ).GetSizePixel() );
m_pVsRefEdge->Clear();
diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index 6713ee885ac6..0073a9ea59cd 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -87,9 +87,6 @@ SvxBorderTabPage::SvxBorderTabPage(Window* pParent, const SfxItemSet& rCoreAttrs
,
-
-
-
aShadowImgLst( CUI_RES(IL_SDW_BITMAPS)),
aBorderImgLst( CUI_RES(IL_PRE_BITMAPS)),
nMinValue(0),
@@ -131,6 +128,25 @@ SvxBorderTabPage::SvxBorderTabPage(Window* pParent, const SfxItemSet& rCoreAttrs
get(m_pMergeWithNextCB, "mergewithnext");
get(m_pMergeAdjacentBordersCB, "mergeadjacent");
+ if ( GetDPIScaleFactor() > 1 )
+ {
+ for (short i = 0; i < aBorderImgLst.GetImageCount(); i++)
+ {
+ OUString rImageName = aBorderImgLst.GetImageName(i);
+ BitmapEx b = aBorderImgLst.GetImage(rImageName).GetBitmapEx();
+ b.Scale(GetDPIScaleFactor(), GetDPIScaleFactor(), BMP_SCALE_FAST);
+ aBorderImgLst.ReplaceImage(rImageName, Image(b));
+ }
+
+ for (short i = 0; i < aShadowImgLst.GetImageCount(); i++)
+ {
+ OUString rImageName = aShadowImgLst.GetImageName(i);
+ BitmapEx b = aShadowImgLst.GetImage(rImageName).GetBitmapEx();
+ b.Scale(GetDPIScaleFactor(), GetDPIScaleFactor(), BMP_SCALE_FAST);
+ aShadowImgLst.ReplaceImage(rImageName, Image(b));
+ }
+ }
+
// this page needs ExchangeSupport
SetExchangeSupport();