From 59ad262ab97c497c3e8a24d2e4a65b38f1d1dbec Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 4 Jan 2017 18:47:55 +0000 Subject: last bitmaps that pMaskColor arg was used on converted to true transparency Change-Id: I99bb32355bc53e2c870f84e60fc1e35b9dfe8270 --- vcl/source/control/button.cxx | 3 +-- vcl/source/image/ImageList.cxx | 9 +-------- 2 files changed, 2 insertions(+), 10 deletions(-) (limited to 'vcl') diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index 6eceff68a954..d88ad0417d17 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -2764,10 +2764,9 @@ static void LoadThemedImageList (const StyleSettings &rStyleSettings, aColorAry2[4] = rStyleSettings.GetDarkShadowColor(); aColorAry2[5] = rStyleSettings.GetWindowTextColor(); - Color aMaskColor(0x00, 0x00, 0xFF ); static_assert( sizeof(aColorAry1) == sizeof(aColorAry2), "aColorAry1 must match aColorAry2" ); // FIXME: do we want the mask for the checkbox ? - pList->InsertFromHorizontalBitmap (rResId, nImages, &aMaskColor, + pList->InsertFromHorizontalBitmap (rResId, nImages, aColorAry1, aColorAry2, SAL_N_ELEMENTS(aColorAry1)); } diff --git a/vcl/source/image/ImageList.cxx b/vcl/source/image/ImageList.cxx index 748e19da8fb7..e9b8c33d96c4 100644 --- a/vcl/source/image/ImageList.cxx +++ b/vcl/source/image/ImageList.cxx @@ -120,19 +120,12 @@ void ImageList::InsertFromHorizontalStrip( const BitmapEx &rBitmapEx, void ImageList::InsertFromHorizontalBitmap( const ResId& rResId, sal_uInt16 nCount, - const Color *pMaskColor, const Color *pSearchColors, const Color *pReplaceColors, sal_uLong nColorCount) { BitmapEx aBmpEx( rResId ); - if (!aBmpEx.IsTransparent()) - { - if( pMaskColor ) - aBmpEx = BitmapEx( aBmpEx.GetBitmap(), *pMaskColor ); - else - aBmpEx = BitmapEx( aBmpEx.GetBitmap() ); - } + if ( nColorCount && pSearchColors && pReplaceColors ) aBmpEx.Replace( pSearchColors, pReplaceColors, nColorCount ); -- cgit