summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorKeith Curtis <keithcu@gmail.com>2014-01-02 16:01:07 -0500
committerJan Holesovsky <kendy@collabora.com>2014-01-04 13:01:52 +0100
commitae37972cd25117d467d34ee8591c21dcbb5a0fec (patch)
treee3125042122cc611150dcfb848307e43a7e00451 /svx
parentbdc192739892114e8b159a8af185ff28b873e748 (diff)
hidpi: Sidebar, fontwork, autoformat and other improvements.
This is a second batch of HiDPI changes. It fixes the following areas: Sidebar * Impress Master pages preview * deck title height * tab (icon) bar * valueset dropdown control * wider maximum width * Draw and other misc. buttons which didn't get fixed by earlier change to Toolbar.SetItemImage There are several more sidebar issues, but it is much improved. Other changes * Writer and Calc auto-format dialog text * file-properties document image * fontwork gallery preview size * Calc table border control Change-Id: I95a0169a3b011836b1c75b3dcacb2733c9567ef3
Diffstat (limited to 'svx')
-rw-r--r--svx/source/sidebar/tools/ValueSetWithTextControl.cxx29
-rw-r--r--svx/source/tbxctrls/fontworkgallery.cxx4
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx13
3 files changed, 45 insertions, 1 deletions
diff --git a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx
index 25d5798323f4..b897facd7aea 100644
--- a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx
+++ b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx
@@ -99,6 +99,21 @@ void ValueSetWithTextControl::AddItem(
aItem.maSelectedItemImage = (pSelectedItemImage != 0)
? *pSelectedItemImage
: rItemImage;
+
+ if ( GetDPIScaleFactor() > 1 )
+ {
+ BitmapEx b = aItem.maItemImage.GetBitmapEx();
+ b.Scale(GetDPIScaleFactor(), GetDPIScaleFactor());
+ aItem.maItemImage = Image(b);
+
+ if ( pSelectedItemImage != 0 )
+ {
+ b = aItem.maSelectedItemImage.GetBitmapEx();
+ b.Scale(GetDPIScaleFactor(), GetDPIScaleFactor());
+ aItem.maSelectedItemImage = Image(b);
+ }
+ }
+
aItem.maItemText = rItemText;
maItems.push_back( aItem );
@@ -151,6 +166,20 @@ void ValueSetWithTextControl::ReplaceItemImages(
maItems[nItemId-1].maSelectedItemImage = (pSelectedItemImage != 0)
? *pSelectedItemImage
: rItemImage;
+
+ if ( GetDPIScaleFactor() > 1 )
+ {
+ BitmapEx b = maItems[nItemId-1].maItemImage.GetBitmapEx();
+ b.Scale(GetDPIScaleFactor(), GetDPIScaleFactor());
+ maItems[nItemId-1].maItemImage = Image(b);
+
+ if ( pSelectedItemImage != 0 )
+ {
+ b = maItems[nItemId-1].maSelectedItemImage.GetBitmapEx();
+ b.Scale(GetDPIScaleFactor(), GetDPIScaleFactor());
+ maItems[nItemId-1].maSelectedItemImage = Image(b);
+ }
+ }
}
diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx
index db81609fe450..01b34f923724 100644
--- a/svx/source/tbxctrls/fontworkgallery.cxx
+++ b/svx/source/tbxctrls/fontworkgallery.cxx
@@ -126,6 +126,10 @@ void FontWorkGalleryDialog::initFavorites(sal_uInt16 nThemeId)
{
VirtualDevice aVDev;
const Point aNull(0, 0);
+
+ if (GetDPIScaleFactor() > 1)
+ aThumb.Scale(GetDPIScaleFactor(), GetDPIScaleFactor());
+
const Size aSize(aThumb.GetSizePixel());
aVDev.SetOutputSizePixel(aSize);
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index f7976e8ab12b..6d6befa2ff1f 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -1265,6 +1265,17 @@ SvxFrameWindow_Impl::SvxFrameWindow_Impl( sal_uInt16 nId, const Reference< XFram
AddStatusListener(OUString(".uno:BorderReducedMode"));
aImgList = ImageList( SVX_RES( RID_SVXIL_FRAME ) );
+ if( pParentWindow->GetDPIScaleFactor() > 1 )
+ {
+ for (short i = 0; i < aImgList.GetImageCount(); i++)
+ {
+ OUString rImageName = aImgList.GetImageName(i);
+ BitmapEx b = aImgList.GetImage(rImageName).GetBitmapEx();
+ b.Scale(pParentWindow->GetDPIScaleFactor(), pParentWindow->GetDPIScaleFactor());
+ aImgList.ReplaceImage(rImageName, Image(b));
+ }
+ }
+
/*
* 1 2 3 4
* -------------------------------------
@@ -1287,7 +1298,7 @@ SvxFrameWindow_Impl::SvxFrameWindow_Impl( sal_uInt16 nId, const Reference< XFram
aFrameSet.SetColCount( 4 );
aFrameSet.SetSelectHdl( LINK( this, SvxFrameWindow_Impl, SelectHdl ) );
- lcl_CalcSizeValueSet( *this, aFrameSet,Size( 20, 20 ));
+ lcl_CalcSizeValueSet( *this, aFrameSet, Size( 20 * pParentWindow->GetDPIScaleFactor(), 20 * pParentWindow->GetDPIScaleFactor() ));
SetHelpId( HID_POPUP_FRAME );
SetText( SVX_RESSTR(RID_SVXSTR_FRAME) );