From: vipul Date: Fri, 23 Aug 2013 11:21:27 +0000 (+0530) Subject: Fix for issue N_SE-49549 X-Git-Tag: accepted/tizen/20131002.165803^2~338^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8a6bb112c0d95cf736f2497c5d01cfeb00929631;p=platform%2Fframework%2Fnative%2Fuifw.git Fix for issue N_SE-49549 Signed-off-by: vipul Change-Id: I2039582b0c7ee763151b892023a65134896abf81 --- diff --git a/src/ui/controls/FUiCtrl_TabBarPresenter.cpp b/src/ui/controls/FUiCtrl_TabBarPresenter.cpp index db2466b..d2438a9 100644 --- a/src/ui/controls/FUiCtrl_TabBarPresenter.cpp +++ b/src/ui/controls/FUiCtrl_TabBarPresenter.cpp @@ -480,7 +480,7 @@ _TabBarPresenter::SetTopDrawnItemIndex(int index) distance = movableDistance; } - r = AdjustItemPositionX(-distance); + r = AdjustItemPositionX(-distance + __arrowMargin); SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); return E_SUCCESS; @@ -637,12 +637,6 @@ _TabBarPresenter::ShiftToFocusedItem(int itemIndex, _FocusDirectionMove directio else { r = SetTopDrawnItemIndex(firstDrawnItemIndex + 1); - - pItem = GetItemAt(itemIndex); - SysTryReturn(NID_UI_CTRL, pItem != null, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Item loading fail."); - - itemBounds = pItem->GetBounds(); - AdjustItemPositionX((clientBounds.width - (__sideMargin * 2.0f)) - (itemBounds.x + itemBounds.width)); } SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); @@ -672,7 +666,7 @@ _TabBarPresenter::ResetItemPositionX(void) if (!_FloatCompare(firstItemBounds.x, 0.0f) && lastItemBounds.x + lastItemBounds.width - firstItemBounds.x < clientBounds.width - __sideMargin * 2.0f) { - AdjustItemPositionX(-firstItemBounds.x); + AdjustItemPositionX(-firstItemBounds.x + __arrowMargin); } else if (!_FloatCompare(firstItemBounds.x, 0.0f) && lastItemBounds.x + lastItemBounds.width < clientBounds.width - __sideMargin * 2.0f) { diff --git a/src/ui/inc/FUi_ResourceTabBarConfig.h b/src/ui/inc/FUi_ResourceTabBarConfig.h index 6bd121b..d6c2eb5 100644 --- a/src/ui/inc/FUi_ResourceTabBarConfig.h +++ b/src/ui/inc/FUi_ResourceTabBarConfig.h @@ -51,8 +51,7 @@ DECLARE_UI_CONFIG(TABBAR); DECLARE_SHAPE_CONFIG(ITEM_MAX_WIDTH, 7); DECLARE_SHAPE_CONFIG(ITEM_HEIGHT, 8); DECLARE_SHAPE_CONFIG(HEIGHT, 9); -// DECLARE_SHAPE_CONFIG(ITEM_COUNT_MAX, 10); - DECLARE_SHAPE_CONFIG(ARROW_MARGIN, 11); + DECLARE_SHAPE_CONFIG(ARROW_MARGIN, 10); DECLARE_FIXED_VALUE_CONFIG(ITEM_COUNT_MAX, 1); DECLARE_END_UI_CONFIG(TABBAR); diff --git a/src/ui/resource/FUi_ResourceTabBarConfig.cpp b/src/ui/resource/FUi_ResourceTabBarConfig.cpp index d7f1c0e..d8937c8 100644 --- a/src/ui/resource/FUi_ResourceTabBarConfig.cpp +++ b/src/ui/resource/FUi_ResourceTabBarConfig.cpp @@ -56,7 +56,6 @@ START_UI_CONFIG(TABBAR); ADD_SHAPE_CONFIG(ITEM_MAX_WIDTH, 444); ADD_SHAPE_CONFIG(ITEM_HEIGHT, 72); ADD_SHAPE_CONFIG(HEIGHT, 90); -// ADD_SHAPE_CONFIG(ITEM_COUNT_MAX, 100); ADD_SHAPE_CONFIG(ARROW_MARGIN, 8); ADD_FIXED_VALUE_CONFIG(ITEM_COUNT_MAX, 100);