summaryrefslogtreecommitdiff
path: root/sfx2/source/sidebar/TabBar.cxx
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 /sfx2/source/sidebar/TabBar.cxx
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 'sfx2/source/sidebar/TabBar.cxx')
-rw-r--r--sfx2/source/sidebar/TabBar.cxx25
1 files changed, 21 insertions, 4 deletions
diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx
index ba5974dadf12..353a2bb4238c 100644
--- a/sfx2/source/sidebar/TabBar.cxx
+++ b/sfx2/source/sidebar/TabBar.cxx
@@ -150,7 +150,14 @@ void TabBar::SetDecks (
void TabBar::UpdateButtonIcons (void)
{
- mpMenuButton->SetModeImage(Theme::GetImage(Theme::Image_TabBarMenu));
+ Image aImage = Theme::GetImage(Theme::Image_TabBarMenu);
+ if ( mpMenuButton->GetDPIScaleFactor() > 1 )
+ {
+ BitmapEx b = aImage.GetBitmapEx();
+ b.Scale(mpMenuButton->GetDPIScaleFactor(), mpMenuButton->GetDPIScaleFactor(), BMP_SCALE_FAST);
+ aImage = Image(b);
+ }
+ mpMenuButton->SetModeImage(aImage);
for(ItemContainer::const_iterator
iItem(maItems.begin()), iEnd(maItems.end());
@@ -159,7 +166,17 @@ void TabBar::UpdateButtonIcons (void)
{
const DeckDescriptor* pDeckDescriptor = ResourceManager::Instance().GetDeckDescriptor(iItem->msDeckId);
if (pDeckDescriptor != NULL)
- iItem->mpButton->SetModeImage(GetItemImage(*pDeckDescriptor));
+ {
+ aImage = GetItemImage(*pDeckDescriptor);
+ if ( mpMenuButton->GetDPIScaleFactor() > 1 )
+ {
+ BitmapEx b = aImage.GetBitmapEx();
+ b.Scale(mpMenuButton->GetDPIScaleFactor(), mpMenuButton->GetDPIScaleFactor(), BMP_SCALE_FAST);
+ aImage = Image(b);
+ }
+
+ iItem->mpButton->SetModeImage(aImage);
+ }
}
Invalidate();
@@ -178,8 +195,8 @@ void TabBar::Layout (void)
sal_Int32 nX (aPadding.Top());
sal_Int32 nY (aPadding.Left());
const Size aTabItemSize (
- Theme::GetInteger(Theme::Int_TabItemWidth),
- Theme::GetInteger(Theme::Int_TabItemHeight));
+ Theme::GetInteger(Theme::Int_TabItemWidth) * GetDPIScaleFactor(),
+ Theme::GetInteger(Theme::Int_TabItemHeight) * GetDPIScaleFactor());
// Place the menu button and the separator.
if (mpMenuButton != 0)