summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorKeith Curtis <keithcu@gmail.com>2014-01-02 16:01:07 -0500
committerTor Lillqvist <tml@collabora.com>2014-03-25 11:37:25 +0200
commitbb910dd8563cc2c40e47cd99e890fb2d30373308 (patch)
tree083e01a2462801f6a0ee54916876fdc1b4c84e7e /svx
parent103e5733105c26a923bbe4e7028007649d8d4f20 (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 Reviewed-on: https://gerrit.libreoffice.org/8519 Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
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 db5131b4b0e8..136f814a62b7 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) );