Applied GUI_v3.6 for the table view.
authoryouseong.ji <youseong.ji@samsung.com>
Fri, 10 May 2013 08:35:46 +0000 (17:35 +0900)
committeryouseong.ji <youseong.ji@samsung.com>
Fri, 10 May 2013 08:37:32 +0000 (17:37 +0900)
Change-Id: I7242be1519f60b0b349f8fcb20169a07bfa690c0
Signed-off-by: youseong.ji <youseong.ji@samsung.com>
res/common/usr/share/osp/bitmaps/480x800/00_quick_menu_bg.#.png [new file with mode: 0644]
res/common/usr/share/osp/bitmaps/480x800/00_quick_menu_bg_ef.#.png [new file with mode: 0644]
res/common/usr/share/osp/bitmaps/720x1280/00_quick_menu_bg.#.png [new file with mode: 0644]
res/common/usr/share/osp/bitmaps/720x1280/00_quick_menu_bg_ef.#.png [new file with mode: 0644]
src/ui/controls/FUiCtrl_TableViewItem.cpp
src/ui/inc/FUiCtrl_TableViewItem.h
src/ui/inc/FUi_ResourceTableViewConfig.h
src/ui/resource/FUi_ResourceTableViewConfig.cpp

diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_quick_menu_bg.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_quick_menu_bg.#.png
new file mode 100644 (file)
index 0000000..97ae24d
Binary files /dev/null and b/res/common/usr/share/osp/bitmaps/480x800/00_quick_menu_bg.#.png differ
diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_quick_menu_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_quick_menu_bg_ef.#.png
new file mode 100644 (file)
index 0000000..79d90fa
Binary files /dev/null and b/res/common/usr/share/osp/bitmaps/480x800/00_quick_menu_bg_ef.#.png differ
diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_quick_menu_bg.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_quick_menu_bg.#.png
new file mode 100644 (file)
index 0000000..7781aa0
Binary files /dev/null and b/res/common/usr/share/osp/bitmaps/720x1280/00_quick_menu_bg.#.png differ
diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_quick_menu_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_quick_menu_bg_ef.#.png
new file mode 100644 (file)
index 0000000..76c808a
Binary files /dev/null and b/res/common/usr/share/osp/bitmaps/720x1280/00_quick_menu_bg_ef.#.png differ
index 8092d86..3bb4693 100644 (file)
@@ -2001,38 +2001,38 @@ _TableViewItem::DrawItemBackground(void)
                }
        }
 
-       if(__enabledState)
+       if(IsContextItem())
        {
-               if (__pDrawingProperty->sectionStyleEnabled == true)
-               {
-                       DrawSectionStyleBackground();
-               }
-               else if (__itemType == TABLE_VIEW_ITEM_TYPE_HEADER || __itemType == TABLE_VIEW_ITEM_TYPE_FOOTER)
-               {
-                       SetBackgroundColor(Color(0, 0, 0, 0));
-                       __pHighlightVisualElement->SetBackgroundColor(_Colorf(0.0f, 0.0f, 0.0f, 0.0f));
-               }
-               else if(__itemType == TABLE_VIEW_ITEM_TYPE_TITLE)
-               {
-                       __pHighlightVisualElement->SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255.0f, (float)bgColor.GetGreen() / 255.0f, (float)bgColor.GetBlue() / 255.0f, (float)bgColor.GetAlpha() / 255.0f));
-               }
-               else
-               {
-                       SetBackgroundColor(__colorItemBg[TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL]);
-
-                       __pHighlightVisualElement->SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255.0f, (float)bgColor.GetGreen() / 255.0f, (float)bgColor.GetBlue() / 255.0f, (float)bgColor.GetAlpha() / 255.0f));
-
-                       if (__pDrawingProperty->groupedLookEnabled == true)
-                       {
-                               DrawGroupedLook();
-                       }
-               }
+               DrawContextItemBackground();
+       }
+       else if (__pDrawingProperty->sectionStyleEnabled == true)
+       {
+               DrawSectionStyleBackground();
        }
        else
        {
-               if (__pDrawingProperty->sectionStyleEnabled == true)
+               if(__enabledState)
                {
-                       DrawSectionStyleBackground();
+                       if (__itemType == TABLE_VIEW_ITEM_TYPE_HEADER || __itemType == TABLE_VIEW_ITEM_TYPE_FOOTER)
+                       {
+                               SetBackgroundColor(Color(0, 0, 0, 0));
+                               __pHighlightVisualElement->SetBackgroundColor(_Colorf(0.0f, 0.0f, 0.0f, 0.0f));
+                       }
+                       else if(__itemType == TABLE_VIEW_ITEM_TYPE_TITLE)
+                       {
+                               __pHighlightVisualElement->SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255.0f, (float)bgColor.GetGreen() / 255.0f, (float)bgColor.GetBlue() / 255.0f, (float)bgColor.GetAlpha() / 255.0f));
+                       }
+                       else
+                       {
+                               SetBackgroundColor(__colorItemBg[TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL]);
+
+                               __pHighlightVisualElement->SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255.0f, (float)bgColor.GetGreen() / 255.0f, (float)bgColor.GetBlue() / 255.0f, (float)bgColor.GetAlpha() / 255.0f));
+
+                               if (__pDrawingProperty->groupedLookEnabled == true)
+                               {
+                                       DrawGroupedLook();
+                               }
+                       }
                }
                else
                {
@@ -2385,6 +2385,55 @@ CATCH:
 }
 
 void
+_TableViewItem::DrawContextItemBackground(void)
+{
+       Canvas* pCanvas = null;
+       Bitmap* pContextBg = null;
+       Bitmap* pContextBgEf = null;
+       Bitmap* pReplacementContextBg = null;
+       Color bgColor = __colorItemBg[__drawingStatus];
+
+       FloatRectangle bounds = GetBoundsF();
+       result r = E_SUCCESS;
+
+       r = GET_BITMAP_CONFIG_N(TABLEVIEW::QUICK_MENU_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pContextBg);
+       SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] ContextItem image load failed");
+
+       r = GET_BITMAP_CONFIG_N(TABLEVIEW::QUICK_MENU_BG_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, pContextBgEf);
+       SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] ContextItem image load failed");
+
+       pCanvas = GetVisualElement()->GetCanvasN();
+       SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+
+       pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
+       pCanvas->Clear();
+
+       if(__enabledState)
+       {
+               if(bgColor == null)
+               {
+                       GET_COLOR_CONFIG(TABLEVIEW::CONTEXTITEM_BG_NORMAL, bgColor);
+               }
+       }
+       else
+       {
+               GET_COLOR_CONFIG(TABLEVIEW::ITEM_BG_DISABLED, bgColor);
+       }
+       pReplacementContextBg = Tizen::Graphics::_BitmapImpl::GetColorReplacedBitmapN(*pContextBg, Color::GetColor(COLOR_ID_MAGENTA), bgColor);
+       SysTryCatch(NID_UI_CTRL, pReplacementContextBg != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+
+       DrawBitmap(*pCanvas, FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height), *pReplacementContextBg);
+       DrawBitmap(*pCanvas, FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height), *pContextBgEf);
+
+CATCH:
+       delete pCanvas;
+       delete pContextBg;
+       delete pContextBgEf;
+       delete pReplacementContextBg;
+}
+
+
+void
 _TableViewItem::CreateAnnexStyle(void)
 {
        switch (__annexStyle)
index 6391bcd..9e1c2c5 100644 (file)
@@ -320,6 +320,7 @@ private:
        void DrawItemBackground(void);
        void DrawSectionStyleBackground(void);
        void DrawSectionStyleBackgroundCover(void);
+       void DrawContextItemBackground(void);
        void DrawAnnexStyle(void);
        void DrawCheckBox(void);
        void DrawRadioBox(void);
index 3cc67dc..7354cc9 100644 (file)
@@ -125,6 +125,8 @@ DECLARE_UI_CONFIG(TABLEVIEW);
        DECLARE_IMAGE_CONFIG(SECTIONITEM_TOP_BG_DISABLED, 60);
        DECLARE_IMAGE_CONFIG(SECTIONITEM_CENTER_BG_DISABLED, 61);
        DECLARE_IMAGE_CONFIG(SECTIONITEM_BOTTOM_BG_DISABLED, 62);
+       DECLARE_IMAGE_CONFIG(QUICK_MENU_BG_NORMAL, 63);
+       DECLARE_IMAGE_CONFIG(QUICK_MENU_BG_EFFECT, 64);
 
        DECLARE_DIMENSION_CONFIG(MIN_SIZE, 1);
        DECLARE_SHAPE_CONFIG(ITEM_DEFAULT_FONT_SIZE, 1);
index 38e2099..2016352 100644 (file)
@@ -121,6 +121,8 @@ START_UI_CONFIG(TABLEVIEW);
        ADD_IMAGE_CONFIG(SECTIONITEM_TOP_BG_DISABLED, #00_list_group_bg_top.#.png);
        ADD_IMAGE_CONFIG(SECTIONITEM_CENTER_BG_DISABLED, #00_list_group_bg_center.#.png);
        ADD_IMAGE_CONFIG(SECTIONITEM_BOTTOM_BG_DISABLED, #00_list_group_bg_bottom.#.png);
+       ADD_IMAGE_CONFIG(QUICK_MENU_BG_NORMAL, #00_quick_menu_bg.#.png);
+       ADD_IMAGE_CONFIG(QUICK_MENU_BG_EFFECT, #00_quick_menu_bg_ef.#.png);