From 2ef242bc9769c5117f10d43343e81451ff3bda37 Mon Sep 17 00:00:00 2001 From: SungHee Kim Date: Mon, 24 Jun 2013 14:21:19 +0900 Subject: [PATCH] Applied GUI v4.6 at FastScroll Change-Id: I4a5b85f66d2b060c5d2d1b0b77bbeeb7eacb51a9 Signed-off-by: SungHee Kim --- src/ui/controls/FUiCtrl_FastScroll.cpp | 2 +- src/ui/controls/FUiCtrl_FastScrollPresenter.cpp | 8 ++++++++ src/ui/inc/FUiCtrl_FastScrollPresenter.h | 1 + src/ui/inc/FUi_ResourceFastScrollConfig.h | 1 + src/ui/resource/FUi_ResourceFastScrollConfig.cpp | 1 + 5 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/ui/controls/FUiCtrl_FastScroll.cpp b/src/ui/controls/FUiCtrl_FastScroll.cpp index d56c8b6..a7dbe49 100644 --- a/src/ui/controls/FUiCtrl_FastScroll.cpp +++ b/src/ui/controls/FUiCtrl_FastScroll.cpp @@ -143,6 +143,7 @@ _FastScroll::EnableFadeEffect(bool enable) return; } + GetPresenter().EnableFadeEffect(enable); if (enable) { _AccessibilityContainer* pAccessibilityContainer = GetAccessibilityContainer(); @@ -159,7 +160,6 @@ _FastScroll::EnableFadeEffect(bool enable) InitializeAccessibility(); } - GetPresenter().EnableFadeEffect(enable); } bool diff --git a/src/ui/controls/FUiCtrl_FastScrollPresenter.cpp b/src/ui/controls/FUiCtrl_FastScrollPresenter.cpp index e48bfa7..a30345c 100644 --- a/src/ui/controls/FUiCtrl_FastScrollPresenter.cpp +++ b/src/ui/controls/FUiCtrl_FastScrollPresenter.cpp @@ -74,6 +74,7 @@ namespace Tizen { namespace Ui { namespace Controls _FastScrollViewConfig::_FastScrollViewConfig(void) : __indexBgColor(Color::GetColor(COLOR_ID_BLACK)) , __indexHighlightColor(Color::GetColor(COLOR_ID_BLACK)) + , __indexLineColor(Color::GetColor(COLOR_ID_BLACK)) , __indexSelectedLineColor(Color::GetColor(COLOR_ID_BLACK)) , __indexTextColor(Color::GetColor(COLOR_ID_BLACK)) , __indexDividerColor(Color::GetColor(COLOR_ID_BLACK)) @@ -204,6 +205,9 @@ _FastScrollViewConfig::ReloadConfig(_ControlOrientation orientation) r = GET_COLOR_CONFIG(FASTSCROLL::INDEX_BG_NORMAL, __indexBgColor); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); + r = GET_COLOR_CONFIG(FASTSCROLL::INDEX_LINE_NORMAL, __indexLineColor); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); + r = GET_COLOR_CONFIG(FASTSCROLL::INDEX_LINE_PRESSED, __indexSelectedLineColor); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource."); @@ -230,6 +234,7 @@ _FastScrollViewConfig::ReloadConfig(_ControlOrientation orientation) CATCH: __indexBgColor = Color::GetColor(COLOR_ID_BLACK); __indexHighlightColor = Color::GetColor(COLOR_ID_BLACK); + __indexLineColor= Color::GetColor(COLOR_ID_BLACK); __indexSelectedLineColor= Color::GetColor(COLOR_ID_BLACK); __indexTextColor = Color::GetColor(COLOR_ID_BLACK); __indexDividerColor= Color::GetColor(COLOR_ID_BLACK); @@ -927,6 +932,8 @@ _FastScrollIndexView::DrawBaseIndex() pCanvas->Clear(); pCanvas->SetLineWidth(__viewConfig.__indexSeparatorThickness); + pCanvas->SetForegroundColor(__viewConfig.__indexLineColor); + FloatRectangle bounds = __pBaseIndexVe->GetBounds(); float indexHeight = GetIndexHeight(); @@ -941,6 +948,7 @@ _FastScrollIndexView::DrawBaseIndex() delete pReplacementColorBackgroundBitmap; } + pCanvas->DrawLine(FloatPoint(1.0f, 0.0f), FloatPoint(1.0f, bounds.height)); FloatRectangle indexRect(0.0f, __viewConfig.__indexMarginTop, bounds.width, indexHeight); Bitmap* pReplacementColorBitmap = null; diff --git a/src/ui/inc/FUiCtrl_FastScrollPresenter.h b/src/ui/inc/FUiCtrl_FastScrollPresenter.h index 95a2a0e..4ff0999 100644 --- a/src/ui/inc/FUiCtrl_FastScrollPresenter.h +++ b/src/ui/inc/FUiCtrl_FastScrollPresenter.h @@ -76,6 +76,7 @@ private: Tizen::Graphics::Color __indexBgColor; Tizen::Graphics::Color __indexHighlightColor; + Tizen::Graphics::Color __indexLineColor; Tizen::Graphics::Color __indexSelectedLineColor; Tizen::Graphics::Color __indexTextColor; Tizen::Graphics::Color __indexDividerColor; diff --git a/src/ui/inc/FUi_ResourceFastScrollConfig.h b/src/ui/inc/FUi_ResourceFastScrollConfig.h index cc73ea9..eb50453 100644 --- a/src/ui/inc/FUi_ResourceFastScrollConfig.h +++ b/src/ui/inc/FUi_ResourceFastScrollConfig.h @@ -28,6 +28,7 @@ DECLARE_UI_CONFIG(FASTSCROLL); DECLARE_COLOR_CONFIG(INDEX_TEXT_PRESSED, 6); DECLARE_COLOR_CONFIG(POPUP_BG_NORMAL, 7); DECLARE_COLOR_CONFIG(POPUP_TEXT_NORMAL, 8); + DECLARE_COLOR_CONFIG(INDEX_LINE_NORMAL, 9); DECLARE_IMAGE_CONFIG(INDEX_BG_NORMAL, 1); DECLARE_IMAGE_CONFIG(INDEX_BG_PRESSED, 2); DECLARE_IMAGE_CONFIG(INDEX_LINE_PRESSED, 3); diff --git a/src/ui/resource/FUi_ResourceFastScrollConfig.cpp b/src/ui/resource/FUi_ResourceFastScrollConfig.cpp index 8c97752..37e440b 100644 --- a/src/ui/resource/FUi_ResourceFastScrollConfig.cpp +++ b/src/ui/resource/FUi_ResourceFastScrollConfig.cpp @@ -29,6 +29,7 @@ START_UI_CONFIG(FASTSCROLL); ADD_COLOR_CONFIG(POPUP_BG_NORMAL, $B0731); ADD_COLOR_CONFIG(POPUP_TEXT_NORMAL, $B0732); + ADD_COLOR_CONFIG(INDEX_LINE_NORMAL, $B0724); ADD_IMAGE_CONFIG(INDEX_BG_NORMAL, #00_fast_scroll_rollover_bg.#.png); ADD_IMAGE_CONFIG(INDEX_BG_PRESSED, #00_fast_scroll_rollover_bg_focus.#.png); -- 2.7.4