From ebd3d9c77e5c35258d8b49ddd18d9c52b10c6cc3 Mon Sep 17 00:00:00 2001 From: Jan Holesovsky Date: Fri, 17 Feb 2012 21:35:13 +0100 Subject: [PATCH] Slidesorter: Kill unused maButtonDownBackground. --- .../ui/slidesorter/inc/view/SlsButtonBar.hxx | 1 - .../ui/slidesorter/view/SlsButtonBar.cxx | 20 +++++-------------- 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 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(); } }