Fix for PLM P130820-06606
authorSaravana Balaji S <saravana.bs@samsung.com>
Mon, 26 Aug 2013 09:05:27 +0000 (18:05 +0900)
committerSaravana Balaji S <saravana.bs@samsung.com>
Mon, 26 Aug 2013 09:30:16 +0000 (18:30 +0900)
Change-Id: Ib5c2ccc81e1e828bed5747955da54f188c3236b5
Signed-off-by: Saravana Balaji S <saravana.bs@samsung.com>
src/ui/controls/FUiCtrl_TableViewItem.cpp
src/ui/controls/FUiCtrl_TableViewPresenter.cpp
src/ui/inc/FUiCtrl_TableViewItem.h

index b164f03..3c2e536 100644 (file)
@@ -240,6 +240,7 @@ _TableViewItem::_TableViewItem(float itemHeight)
        , __isTabSoundPlayed(false)
        , __isSelectedDetailButton(false)
        , __isSimpleLastItem(false)
+       , __isSectionItem(false)
        , __isTouchPressOnScroll(false)
        , __isTouchCancelOnPressRelease(false)
        , __pHighlightVisualElement(null)
@@ -3237,7 +3238,8 @@ _TableViewItem::DrawItemDivider(void)
        if (__pDrawingProperty->itemDividerEnabled == false ||
                __itemType == TABLE_VIEW_ITEM_TYPE_HEADER ||
                __itemType == TABLE_VIEW_ITEM_TYPE_FOOTER ||
-               __itemDividerEnabled == false)
+               __itemDividerEnabled == false ||
+               __isSectionItem)
        {
                __pItemDivider->SetVisibleState(false);
                __pItemTopDivider->SetVisibleState(false);
@@ -3307,15 +3309,6 @@ _TableViewItem::DrawItemDivider(void)
                float lineLeftMargin = 0.0f;
                float lineHeight = 0.0f;
                bounds = GetBoundsF();
-               int groupIndex = -1;
-               int itemIndex = -1;
-
-               GetItemIndex(groupIndex, itemIndex);
-
-               if (itemIndex < 1)
-               {
-                       __pItemTopDivider->SetVisibleState(false);
-               }
 
                if (!IsContextItem())
                {
@@ -3324,6 +3317,7 @@ _TableViewItem::DrawItemDivider(void)
                                if (__itemType == TABLE_VIEW_ITEM_TYPE_BOTTOM || __itemType == TABLE_VIEW_ITEM_TYPE_ONE)
                                {
                                        __pItemDivider->SetVisibleState(false);
+                                       __pItemTopDivider->SetVisibleState(false);
                                }
                        }
                }
@@ -3338,7 +3332,7 @@ _TableViewItem::DrawItemDivider(void)
                lineHeight = Tizen::Graphics::CoordinateSystem::ConvertToLogicalY(lineHeight);
                bottomPoint = Tizen::Graphics::CoordinateSystem::AlignToDevice(FloatPoint(lineLeftMargin, (bounds.height)));
 
-               dividerTopBounds.SetBounds(lineLeftMargin, 0.0f, bounds.width - lineLeftMargin * 2.0f, lineHeight);
+               dividerTopBounds.SetBounds(lineLeftMargin, bottomPoint.y - (lineHeight * 2.0f), bounds.width - lineLeftMargin * 2.0f, lineHeight);
                dividerBottomBounds.SetBounds(lineLeftMargin, bottomPoint.y - lineHeight, bounds.width - lineLeftMargin * 2.0f, lineHeight);
        }
 
@@ -5255,6 +5249,12 @@ _TableViewItem::SetSimpleLastItemEnabled(bool enable)
 }
 
 void
+_TableViewItem::SetSectionItem(bool isSectionItem)
+{
+    __isSectionItem = isSectionItem;
+}
+
+void
 _TableViewItem::SetTouchPressOnScroll(bool isTouch)
 {
        __isTouchPressOnScroll = isTouch;
index ed49dca..6272b95 100644 (file)
@@ -1440,6 +1440,10 @@ _TableViewPresenter::SetItemType(_TableViewItem* pItem, TableViewItemTag itemPos
                                pItem->SetSimpleLastItemEnabled(false);
                        }
                }
+               if (style == TABLE_VIEW_STYLE_SECTION)
+               {
+                       pItem->SetSectionItem(true);
+               }
 
                if (itemPosition.itemIndex == 0)
                {
index 809ba64..544c176 100644 (file)
@@ -254,6 +254,7 @@ public:
        void FireItemTouchReleased(void);
        void FireItemTouchPressed(void);
        void SetSimpleLastItemEnabled(bool enable);
+       void SetSectionItem(bool isSectionItem);
        void SetTouchPressOnScroll(bool isTouch);
        bool IsTouchPressOnScroll(void) const;
 
@@ -480,6 +481,7 @@ private:
        bool __isTabSoundPlayed;
        bool __isSelectedDetailButton;
        bool __isSimpleLastItem;
+       bool __isSectionItem;
        bool __isTouchPressOnScroll;
 
        bool __isTouchCancelOnPressRelease;