Fixed P130506-6106; Changed highlight area.
authorclone <ingyou.park@samsung.com>
Fri, 10 May 2013 09:10:47 +0000 (18:10 +0900)
committerclone <ingyou.park@samsung.com>
Fri, 10 May 2013 09:10:47 +0000 (18:10 +0900)
Change-Id: I531e5425ffe7f1e9c784e8cd51b1fa1e976e7007
Signed-off-by: clone <ingyou.park@samsung.com>
src/ui/controls/FUiCtrl_ContextMenuItem.cpp

index b837775..c37cf69 100644 (file)
 #include "FUi_AccessibilityContainer.h"
 #include "FUi_AccessibilityElement.h"
 #include "FUi_CoordinateSystemUtils.h"
+#include "FUi_Math.h"
 #include "FUi_ResourceManager.h"
 
+#include "FUiCtrl_ScrollPanel.h"
 #include "FUiCtrl_ContextMenuItem.h"
 
 using namespace Tizen::Base;
@@ -396,7 +398,36 @@ _ContextMenuItem::DrawItemBackground(void)
        }
 
        FloatRectangle bounds = GetBoundsF();
+       _ScrollPanel* pScrollPanel = static_cast<_ScrollPanel*>(GetParent());
+       FloatRectangle boundsScrollPanel = pScrollPanel->GetBoundsF();
+
+       float topOverlap = pScrollPanel->GetScrollPosition() - bounds.y;
+       if (!_FloatCompareLE(topOverlap, 0.0f))
+       {
+               topMargin = topOverlap;
+       }
+       else
+       {
+               topOverlap = 0.0f;
+       }
+
+       float bottomOverlap = bounds.y + bounds.height - (pScrollPanel->GetScrollPosition() + boundsScrollPanel.height);
+       if (!_FloatCompareLE(bottomOverlap, 0.0f))
+       {
+               bottomMargin = bottomOverlap;
+       }
+       else
+       {
+               bottomOverlap = 0.0f;
+       }
+
+       if (!__lowerDividerLine && _FloatCompare(bottomOverlap, __dividerHeight * 2.0f))
+       {
+               bottomMargin = __bgPressedMargin;
+       }
+
        __pBackgroundLabel->SetBounds(FloatRectangle(__bgPressedMargin, topMargin, bounds.width - __bgPressedMargin * 2.0f, bounds.height - topMargin - bottomMargin));
+
        Bitmap* BgBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pMagentaBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), color);
        SysTryReturnVoidResult(NID_UI_CTRL, BgBitmap, E_OUT_OF_MEMORY, "[%s] Propagating.", GetErrorMessage(GetLastResult()));