From: Vinay Dutt Vyas Date: Tue, 9 Jul 2013 13:26:09 +0000 (+0530) Subject: Applying AnnexDividerChanges and making itemDividerLeftMargin as fixedConfig X-Git-Tag: submit/tizen_2.2/20130714.153149~51^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3e86166c91d02a04cdf9cc9c781e7789b8673d8e;p=framework%2Fosp%2Fuifw.git Applying AnnexDividerChanges and making itemDividerLeftMargin as fixedConfig Change-Id: Ia1fbc2323b2603c951cb32f64f5307b1ef4cef08 --- diff --git a/src/ui/controls/FUiCtrl_TableViewItem.cpp b/src/ui/controls/FUiCtrl_TableViewItem.cpp index 58fd43d..3af8ab4 100644 --- a/src/ui/controls/FUiCtrl_TableViewItem.cpp +++ b/src/ui/controls/FUiCtrl_TableViewItem.cpp @@ -3289,14 +3289,15 @@ _TableViewItem::DrawItemDivider(void) customDividerColor = __pDrawingProperty->dividerColor; GET_COLOR_CONFIG(TABLEVIEW::ITEM_DIVIDER_TOP_BG_NORMAL, topLineColor); GET_COLOR_CONFIG(TABLEVIEW::ITEM_DIVIDER_BOTTOM_BG_NORMAL, bottomLineColor); - GET_SHAPE_CONFIG(TABLEVIEW::ITEM_DIVIDER_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, lineLeftMargin); + GET_FIXED_VALUE_CONFIG(TABLEVIEW::ITEM_DIVIDER_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, lineLeftMargin); GET_FIXED_VALUE_CONFIG(TABLEVIEW::ITEM_DIVIDER_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, lineHeight); + lineLeftMargin = Tizen::Graphics::CoordinateSystem::ConvertToLogicalX(lineLeftMargin); lineHeight = Tizen::Graphics::CoordinateSystem::ConvertToLogicalY(lineHeight); bottomPoint = Tizen::Graphics::CoordinateSystem::AlignToDevice(FloatPoint(lineLeftMargin, (bounds.height))); - dividerTopBounds.SetBounds(bottomPoint.x, 0.0f, bounds.width - lineLeftMargin * 2.0f, lineHeight); - dividerBottomBounds.SetBounds(bottomPoint.x, bottomPoint.y - lineHeight, bounds.width - lineLeftMargin * 2.0f, lineHeight); + dividerTopBounds.SetBounds(lineLeftMargin, 0.0f, bounds.width - lineLeftMargin * 2.0f, lineHeight); + dividerBottomBounds.SetBounds(lineLeftMargin, bottomPoint.y - lineHeight, bounds.width - lineLeftMargin * 2.0f, lineHeight); } if(__pItemDivider->GetVisibleState()) @@ -3349,6 +3350,8 @@ _TableViewItem::DrawItemAnnexDivider(void) { Color dividerLeftColor; Color dividerRightColor; + Color customDividerColor; + Color bottomLineColor; FloatRectangle bounds = GetBoundsF(); float dividerHeight = 0; float itemHeight = 0; @@ -3358,11 +3361,13 @@ _TableViewItem::DrawItemAnnexDivider(void) float annexLeftMargin = 0.0f; float itemLeftMargin = 0.0f; + customDividerColor = __pDrawingProperty->dividerColor; GET_SHAPE_CONFIG(TABLEVIEW::ITEM_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, itemLeftMargin); GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, annexLeftMargin); GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_ONOFF_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, annexWidth); GET_COLOR_CONFIG(TABLEVIEW::ITEM_ANNEX_DIVIDER_LEFT_BG_NORMAL, dividerLeftColor); GET_COLOR_CONFIG(TABLEVIEW::ITEM_ANNEX_DIVIDER_RIGHT_BG_NORMAL, dividerRightColor); + GET_COLOR_CONFIG(TABLEVIEW::ITEM_DIVIDER_BOTTOM_BG_NORMAL, bottomLineColor); GET_FIXED_VALUE_CONFIG(TABLEVIEW::ITEM_ANNEX_DIVIDER_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, dividerWidth); GET_FIXED_VALUE_CONFIG(TABLEVIEW::ITEM_ANNEX_DIVIDER_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, dividerTopMargin); @@ -3371,13 +3376,30 @@ _TableViewItem::DrawItemAnnexDivider(void) dividerHeight = itemHeight - (dividerTopMargin*2); dividerHeight = (dividerHeight > 0) ? dividerHeight : 0; __pItemAnnexLeftDivider->SetBounds(FloatRectangle((GetBoundsF().width - annexWidth - (itemLeftMargin + annexLeftMargin) - (dividerWidth*2)), dividerTopMargin, dividerWidth, dividerHeight)); - __pItemAnnexLeftDivider->SetBackgroundColor(dividerLeftColor); - __pItemAnnexLeftDivider->Invalidate(); - __pItemAnnexRightDivider->SetBounds(FloatRectangle((GetBoundsF().width - annexWidth - (itemLeftMargin + annexLeftMargin) - dividerWidth), dividerTopMargin, dividerWidth, dividerHeight)); - __pItemAnnexRightDivider->SetBackgroundColor(dividerRightColor); - __pItemAnnexRightDivider->Invalidate(); + if (customDividerColor == bottomLineColor) + { + __pItemAnnexLeftDivider->SetBackgroundColor(dividerLeftColor); + } + else + { + __pItemAnnexLeftDivider->SetBackgroundColor(customDividerColor); + __pItemAnnexLeftDivider->GetVisualElement()->SetOpacity(ITEM_TOP_DIVIDER_OPACITY); + } + + if (customDividerColor == bottomLineColor) + { + __pItemAnnexRightDivider->SetBackgroundColor(dividerRightColor); + } + else + { + __pItemAnnexRightDivider->SetBackgroundColor(customDividerColor); + __pItemAnnexRightDivider->GetVisualElement()->SetOpacity(ITEM_BOTTOM_DIVIDER_OPACITY); + } + + __pItemAnnexLeftDivider->Invalidate(); + __pItemAnnexRightDivider->Invalidate(); } if (__pItemAnnexLeftDivider != null) diff --git a/src/ui/inc/FUiCtrl_TableViewItem.h b/src/ui/inc/FUiCtrl_TableViewItem.h index 6735e39..b7a1be6 100644 --- a/src/ui/inc/FUiCtrl_TableViewItem.h +++ b/src/ui/inc/FUiCtrl_TableViewItem.h @@ -486,7 +486,6 @@ private: static const float SENSITIVE = 0.08f; static const float ITEM_TOP_DIVIDER_OPACITY = 0.3f; static const float ITEM_BOTTOM_DIVIDER_OPACITY = 1.0f; - static const float ITEM_ANNEX_DIVIDER_OPACITY = 0.2f; }; }}} // Tizen::Ui::Controls diff --git a/src/ui/inc/FUi_ResourceTableViewConfig.h b/src/ui/inc/FUi_ResourceTableViewConfig.h index e376be8..70c99e2 100644 --- a/src/ui/inc/FUi_ResourceTableViewConfig.h +++ b/src/ui/inc/FUi_ResourceTableViewConfig.h @@ -155,11 +155,11 @@ DECLARE_UI_CONFIG(TABLEVIEW); DECLARE_SHAPE_CONFIG(GROUPITEM_INDEX_BAR_LEFT_MARGIN, 19); DECLARE_SHAPE_CONFIG(GROUPITEM_INDEX_BAR_BOTTOM_MARGIN, 20); DECLARE_SHAPE_CONFIG(FASTSCROLL_INDEX_WIDTH, 21); - DECLARE_SHAPE_CONFIG(ITEM_DIVIDER_LEFT_MARGIN,22); DECLARE_FIXED_VALUE_CONFIG(ITEM_DIVIDER_HEIGHT, 1); DECLARE_FIXED_VALUE_CONFIG(SECTIONITEM_TOP_MARGIN, 2); DECLARE_FIXED_VALUE_CONFIG(ITEM_ANNEX_DIVIDER_WIDTH, 3); DECLARE_FIXED_VALUE_CONFIG(ITEM_ANNEX_DIVIDER_MARGIN, 4); + DECLARE_FIXED_VALUE_CONFIG(ITEM_DIVIDER_LEFT_MARGIN, 5); DECLARE_END_UI_CONFIG(TABLEVIEW); #endif //_FUI_RESOURCE_TABLE_VIEW_CONFIG_H_ diff --git a/src/ui/resource/FUi_ResourceTableViewConfig.cpp b/src/ui/resource/FUi_ResourceTableViewConfig.cpp index 08190a6..247448b 100644 --- a/src/ui/resource/FUi_ResourceTableViewConfig.cpp +++ b/src/ui/resource/FUi_ResourceTableViewConfig.cpp @@ -149,11 +149,11 @@ START_UI_CONFIG(TABLEVIEW); ADD_SHAPE_CONFIG(GROUPITEM_INDEX_BAR_LEFT_MARGIN, 0); ADD_SHAPE_CONFIG(GROUPITEM_INDEX_BAR_BOTTOM_MARGIN, 14); ADD_SHAPE_CONFIG(FASTSCROLL_INDEX_WIDTH, 51); - ADD_SHAPE_CONFIG(ITEM_DIVIDER_LEFT_MARGIN, 2); ADD_FIXED_VALUE_CONFIG(ITEM_DIVIDER_HEIGHT, 1); ADD_FIXED_VALUE_CONFIG(SECTIONITEM_TOP_MARGIN, 0); ADD_FIXED_VALUE_CONFIG(ITEM_ANNEX_DIVIDER_WIDTH, 1); ADD_FIXED_VALUE_CONFIG(ITEM_ANNEX_DIVIDER_MARGIN, 30); + ADD_FIXED_VALUE_CONFIG(ITEM_DIVIDER_LEFT_MARGIN, 2); END_UI_CONFIG_MODE(720x1280); } END_UI_CONFIG(TABLEVIEW);