IconListView SetTextColor during Construct not working fix
authorSreedeep Moulik <sreedeep.m@samsung.com>
Tue, 9 Jul 2013 09:08:04 +0000 (14:38 +0530)
committerSreedeep Moulik <sreedeep.m@samsung.com>
Tue, 9 Jul 2013 09:08:04 +0000 (14:38 +0530)
Change-Id: Ib7d1b1f4dc545d570afb7276eb389b9cc5b5afeb
Signed-off-by: Sreedeep Moulik <sreedeep.m@samsung.com>
src/ui/controls/FUiCtrl_IconListItemDrawingProperty.cpp
src/ui/inc/FUiCtrl_IconListItemDrawingProperty.h

index e0a57c8..f378690 100644 (file)
@@ -76,6 +76,7 @@ _IconListItemDrawingProperty::_IconListItemDrawingProperty(void)
        , __itemTextHorizontalMargin(0.0f)
        , __itemTextVerticalMargin(0.0f)
        , __accessibilityEnabled(false)
+       , __customColorSet(false)
 {
        // Do nothing
 }
@@ -343,6 +344,7 @@ _IconListItemDrawingProperty::SetTextColor(IconListViewItemDrawingStatus status,
        }
 
        __changed = true;
+       __customColorSet = true;
        return E_SUCCESS;
 }
 
@@ -421,17 +423,20 @@ _IconListItemDrawingProperty::SetItemLayout(void)
                break;
        }
 
-       if (__textVerticalAlignment >= ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_INSIDE_TOP && __textVerticalAlignment <= ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_INSIDE_BOTTOM)
+       if (!__customColorSet)
        {
-               GET_COLOR_CONFIG(ICONLIST::INNER_TEXT_NORMAL, __normalTextColor);
-               GET_COLOR_CONFIG(ICONLIST::INNER_TEXT_PRESSED, __pressedTextColor);
-               GET_COLOR_CONFIG(ICONLIST::INNER_TEXT_HIGHLIGHTED, __highlightedTextColor);
-       }
-       else if (__textVerticalAlignment >= ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_OUTSIDE_TOP && __textVerticalAlignment <= ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_OUTSIDE_BOTTOM)
-       {
-               GET_COLOR_CONFIG(ICONLIST::TEXT_NORMAL, __normalTextColor);
-               GET_COLOR_CONFIG(ICONLIST::TEXT_PRESSED, __pressedTextColor);
-               GET_COLOR_CONFIG(ICONLIST::TEXT_HIGHLIGHTED, __highlightedTextColor);
+               if (__textVerticalAlignment >= ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_INSIDE_TOP && __textVerticalAlignment <= ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_INSIDE_BOTTOM)
+               {
+                       GET_COLOR_CONFIG(ICONLIST::INNER_TEXT_NORMAL, __normalTextColor);
+                       GET_COLOR_CONFIG(ICONLIST::INNER_TEXT_PRESSED, __pressedTextColor);
+                       GET_COLOR_CONFIG(ICONLIST::INNER_TEXT_HIGHLIGHTED, __highlightedTextColor);
+               }
+               else if (__textVerticalAlignment >= ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_OUTSIDE_TOP && __textVerticalAlignment <= ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_OUTSIDE_BOTTOM)
+               {
+                       GET_COLOR_CONFIG(ICONLIST::TEXT_NORMAL, __normalTextColor);
+                       GET_COLOR_CONFIG(ICONLIST::TEXT_PRESSED, __pressedTextColor);
+                       GET_COLOR_CONFIG(ICONLIST::TEXT_HIGHLIGHTED, __highlightedTextColor);
+               }
        }
 
        __changed = true;
index d9089e9..8d33e24 100644 (file)
@@ -214,6 +214,7 @@ private:
        float __itemTextVerticalMargin;
 
        bool __accessibilityEnabled;
+       bool __customColorSet;
 }; // _IconListItemDrawingProperty
 
 }}} // Tizen::Ui::Controls