summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2012-02-17 21:35:13 +0100
committerJan Holesovsky <kendy@suse.cz>2012-02-17 23:47:12 +0100
commitebd3d9c77e5c35258d8b49ddd18d9c52b10c6cc3 (patch)
tree8703f49be317aa8c106e59e333bb4556dc8ab776 /sd
parentc6b151f1f8f11d7600058638c6598c1828429b6e (diff)
Slidesorter: Kill unused maButtonDownBackground.
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/slidesorter/inc/view/SlsButtonBar.hxx1
-rw-r--r--sd/source/ui/slidesorter/view/SlsButtonBar.cxx20
2 files changed, 5 insertions, 16 deletions
diff --git a/sd/source/ui/slidesorter/inc/view/SlsButtonBar.hxx b/sd/source/ui/slidesorter/inc/view/SlsButtonBar.hxx
index 6d8ce622b7bc..13b49f0e663f 100644
--- a/sd/source/ui/slidesorter/inc/view/SlsButtonBar.hxx
+++ b/sd/source/ui/slidesorter/inc/view/SlsButtonBar.hxx
@@ -143,7 +143,6 @@ private:
::std::vector<SharedButton> maRegularButtons;
::std::vector<SharedButton> maExcludedButtons;
BitmapEx maNormalBackground;
- BitmapEx maButtonDownBackground;
bool mbIsMouseOverBar;
::boost::scoped_ptr<BackgroundTheme> mpBackgroundTheme;
int mnLockCount;
diff --git a/sd/source/ui/slidesorter/view/SlsButtonBar.cxx b/sd/source/ui/slidesorter/view/SlsButtonBar.cxx
index 6145b944f91c..06a207404862 100644
--- a/sd/source/ui/slidesorter/view/SlsButtonBar.cxx
+++ b/sd/source/ui/slidesorter/view/SlsButtonBar.cxx
@@ -159,7 +159,6 @@ ButtonBar::ButtonBar (SlideSorter& rSlideSorter)
maRegularButtons(),
maExcludedButtons(),
maNormalBackground(),
- maButtonDownBackground(),
mbIsMouseOverBar(false),
mpBackgroundTheme(),
mnLockCount(0)
@@ -409,27 +408,19 @@ void ButtonBar::PaintButtonBackground (
const model::SharedPageDescriptor& rpDescriptor,
const Point aOffset)
{
- BitmapEx* pBitmap = NULL;
- if (maButtonDownBackground.IsEmpty() || maNormalBackground.IsEmpty())
+ if (maNormalBackground.IsEmpty())
{
if (mpBackgroundTheme)
- {
- maButtonDownBackground = mpBackgroundTheme->CreateBackground();
maNormalBackground = mpBackgroundTheme->CreateBackground();
- }
}
- if (mpButtonUnderMouse && mpButtonUnderMouse->IsDown())
- pBitmap = &maButtonDownBackground;
- else
- pBitmap = &maNormalBackground;
- if (pBitmap != NULL)
+ if (!maNormalBackground.IsEmpty())
{
- AlphaMask aMask (pBitmap->GetSizePixel());
+ AlphaMask aMask (maNormalBackground.GetSizePixel());
AdaptTransparency(
aMask,
- pBitmap->GetAlpha(),
+ maNormalBackground.GetAlpha(),
rpDescriptor->GetVisualState().GetButtonBarAlpha());
- rDevice.DrawBitmapEx(maBackgroundLocation+aOffset, BitmapEx(pBitmap->GetBitmap(), aMask));
+ rDevice.DrawBitmapEx(maBackgroundLocation+aOffset, BitmapEx(maNormalBackground.GetBitmap(), aMask));
}
}
@@ -469,7 +460,6 @@ void ButtonBar::LayoutButtons (const Size aPageObjectSize)
// Release the background bitmaps so that on the next paint
// they are created anew in the right size.
maNormalBackground.SetEmpty();
- maButtonDownBackground.SetEmpty();
}
}