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 maRegularButtons; ::std::vector maExcludedButtons; BitmapEx maNormalBackground; - BitmapEx maButtonDownBackground; bool mbIsMouseOverBar; ::boost::scoped_ptr 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(); } }