From d01741ba88d1466fe684a99539be958857db9ecb Mon Sep 17 00:00:00 2001 From: kishorekumar Dachinamoorthy Date: Thu, 9 May 2013 13:58:28 +0530 Subject: [PATCH] Adding IS_CUSTOM_BITMAP checks for slider's groupstyles. Change-Id: I422b0cf31ff084323002b9925ff9657900d04db9 Signed-off-by: kishorekumar Dachinamoorthy --- src/ui/controls/FUiCtrl_SliderPresenter.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/ui/controls/FUiCtrl_SliderPresenter.cpp b/src/ui/controls/FUiCtrl_SliderPresenter.cpp index 248955a..5cc11be 100644 --- a/src/ui/controls/FUiCtrl_SliderPresenter.cpp +++ b/src/ui/controls/FUiCtrl_SliderPresenter.cpp @@ -823,6 +823,7 @@ _SliderPresenter::DrawBackground(Canvas& canvas) Bitmap* pBgBitmap = null; Bitmap* pBgEffectBitmap = null; Bitmap* pBgGroupBitmap = null; + bool isCustomBitmap = false; int opacity = 0; result r = E_SUCCESS; @@ -834,6 +835,7 @@ _SliderPresenter::DrawBackground(Canvas& canvas) switch (__groupStyle) { case GROUP_STYLE_TOP: + isCustomBitmap = IS_CUSTOM_BITMAP(SLIDER::GROUPED_TOP_BG_NORMAL); pBgEffectBitmap = __pBgTopEffectBitmap; if (__pSlider->GetColor() == __currentBgColor) { @@ -863,6 +865,7 @@ _SliderPresenter::DrawBackground(Canvas& canvas) break; case GROUP_STYLE_MIDDLE: + isCustomBitmap = IS_CUSTOM_BITMAP(SLIDER::GROUPED_MIDDLE_BG_NORMAL); pBgEffectBitmap = __pBgMiddleEffectBitmap; if (__pSlider->GetColor() == __currentBgColor) { @@ -892,6 +895,7 @@ _SliderPresenter::DrawBackground(Canvas& canvas) break; case GROUP_STYLE_BOTTOM: + isCustomBitmap = IS_CUSTOM_BITMAP(SLIDER::GROUPED_BOTTOM_BG_NORMAL); pBgEffectBitmap = __pBgBottomEffectBitmap; if (__pSlider->GetColor() == __currentBgColor) { @@ -921,6 +925,7 @@ _SliderPresenter::DrawBackground(Canvas& canvas) break; case GROUP_STYLE_SINGLE: + isCustomBitmap = IS_CUSTOM_BITMAP(SLIDER::GROUPED_SINGLE_BG_NORMAL); pBgEffectBitmap = __pBgSingleEffectBitmap; if (__pSlider->GetColor() == __currentBgColor) { @@ -984,7 +989,10 @@ _SliderPresenter::DrawBackground(Canvas& canvas) DrawBitmap(canvas, __rect, pBgBitmap); if ( __groupStyle != GROUP_STYLE_NONE) { - DrawBitmap(canvas, __rect, pBgEffectBitmap); + if (isCustomBitmap == false) + { + DrawBitmap(canvas, __rect, pBgEffectBitmap); + } } } return E_SUCCESS; -- 2.7.4