_EcoreEvas::GetActiveWindow(void)
{
Ecore_X_Window* pRoots = null;
+ Ecore_X_Window activeWin = 0;
int num = 0;
pRoots = ecore_x_window_root_list(&num);
- Ecore_X_Atom activeAtom = ecore_x_atom_get("_NET_ACTIVE_WINDOW");
+ if (pRoots)
+ {
+ Ecore_X_Atom activeAtom = ecore_x_atom_get("_NET_ACTIVE_WINDOW");
+ int ret = ecore_x_window_prop_window_get(pRoots[0], activeAtom, &activeWin, 1);
- Ecore_X_Window activeWin = 0;
- ecore_x_window_prop_window_get(pRoots[0], activeAtom, &activeWin, 1);
+ free(pRoots);
- free(pRoots);
+ if (ret < 0)
+ {
+ return 0;
+ }
+ }
return activeWin;
}
}
}
+// [ToDo] Remove API
void
_EcoreEvas::SetQuickPanelScrollEnabled(const _Window& window, bool enable)
{
+ /*
_EflLayer* pLayer = GetEflLayer(window);
SysTryReturnVoidResult(NID_UI, pLayer, E_INVALID_ARG, "[E_INVALID_ARG] The window doesn't have a elf layer.");
}
ecore_x_window_prop_card32_set(win, atomPanelScrollable, val, 3);
+ */
}
+// [ToDo] Remove API
bool
_EcoreEvas::IsQuickPanelScrollEnabled(const _Window& window)
{
+ /*
_EflLayer* pLayer = GetEflLayer(window);
SysTryReturn(NID_UI, pLayer, false, E_INVALID_ARG, "[E_INVALID_ARG] The window doesn't have a elf layer.");
{
return true;
}
+ */
+
+ return true;
}
void
SysTryReturnResult(NID_UI, pMsg, E_OUT_OF_MEMORY, "Memory is insufficient.");
SysLog(NID_UI, "IPC message(0x%x, %d) is sent.", window, windowZOrderGroup);
- __pIpcClient->SendRequest(*pMsg.get());
+ result ret = __pIpcClient->SendRequest(*pMsg.get());
+ SysTryReturnResult(NID_UI, ret == E_SUCCESS, ret, "Propagating.");
SysTryReturnResult(NID_UI, r == E_SUCCESS, E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
return E_SUCCESS;
pNode->SetChildrenBaseTime(_AnimationTime::GetTime());
__pRootTransaction->AddChild(*pNode);
+
+ __committedList.SetAt(null, index);
}
- __committedList.SetAt(null, index);
}
__committedList.RemoveAll();
else
{
_ListViewItemStatus itemStatus;
+ memset(&itemStatus, 0, sizeof(_ListViewItemStatus));
+
_TouchManager* pTouchManager = _TouchManager::GetInstance();
bool needChangeEventTarget = false;
int touchedGroupIndex = -1;
result r = E_SYSTEM;
_UiBuilderControlLayout* pControlProperty = null;
GroupedListView* pGroupedListView = null;
- Rectangle rect;
+ FloatRectangle rect;
+ ListScrollStyle scrollStyle = SCROLL_STYLE_FADE_OUT;
GroupedListViewStyle style = GROUPED_LIST_VIEW_STYLE_INDEXED;
+ ScrollInputMode scrollInputMode = SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION;
+
String elementString;
bool itemDividerState = true;
- bool fastScrollState = false;
int opacity = 100;
bool sweepEnabledState = false;
Color color;
return null;
}
- rect = pControlProperty->GetRect();
+ rect = pControlProperty->GetRectF();
String styleString;
styleString = pControlProperty->GetStyle();
}
}
- if (pControl->GetElement(L"fastScroll", elementString))
+ if (pControl->GetElement(L"listScrollStyle", elementString))
{
- if (elementString.Equals(L"true", false))
+ if (elementString.Equals(L"SCROLL_STYLE_FIXED", false))
{
- fastScrollState = true;
+ scrollStyle = SCROLL_STYLE_FIXED;
}
- else
+ else if (elementString.Equals(L"SCROLL_STYLE_FAST_SCROLL", false))
+ {
+ scrollStyle = SCROLL_STYLE_FAST_SCROLL;
+ }
+ else if (elementString.Equals(L"SCROLL_STYLE_JUMP_TO_TOP", false))
+ {
+ scrollStyle = SCROLL_STYLE_JUMP_TO_TOP;
+ }
+ else if (elementString.Equals(L"SCROLL_STYLE_THUMB", false))
{
- fastScrollState = false;
+ scrollStyle = SCROLL_STYLE_THUMB;
+ }
+ }
+ else if (pControl->GetElement(L"fastScroll", elementString))
+ {
+ if (elementString.Equals(L"true", false))
+ {
+ scrollStyle = SCROLL_STYLE_FAST_SCROLL;
}
}
- r = pGroupedListView->Construct(rect, style, itemDividerState, fastScrollState);
+ r = pGroupedListView->Construct(rect, style, itemDividerState, scrollStyle);
SysTryCatch(NID_UI, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
// Set BackgroundsBitmap
SysTryCatch(NID_UI, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
}
+ // scroll Input Mode
+ if (pControl->GetElement(L"scrollInputMode", elementString))
+ {
+ if (elementString.Equals(L"SCROLL_INPUT_MODE_RESTRICT_TO_INITIAL_DIRECTION", false))
+ {
+ scrollInputMode = SCROLL_INPUT_MODE_RESTRICT_TO_INITIAL_DIRECTION;
+ }
+
+ pGroupedListView->SetScrollInputMode(scrollInputMode);
+ }
+
return pGroupedListView;
CATCH:
delete pGroupedListView;
- pGroupedListView = null;
return null;
}
{
Canvas* pCanvas = __pCheckAnimationVE->GetCanvasN();
+ if (pCanvas == null)
+ {
+ return;
+ }
+
const Bitmap* pBitmap = null;
pBitmap = IsItemChecked(__checkedIndex) ? __pItemDrawingProperty->GetCheckBitmap(): null;
const Bitmap* pBackgroundBitmap = __pListModel->IsItemEnabled(DEFAULT_GROUP_INDEX, index) ? (IsItemChecked(index) ? __pItemDrawingProperty->GetCheckedBackgroundBitmap() : __pItemDrawingProperty->GetUnCheckedBackgroundBitmap()) : __pItemDrawingProperty->GetDisabledCheckBitmap();
Canvas* pCheckBgCanvas = pItem->GetCheckBGVisualElement()->GetCanvasN();
+
+ if (pCheckBgCanvas == null)
+ {
+ return;
+ }
+
pCheckBgCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
pCheckBgCanvas->Clear();
if ((topItemIndex <= index) && (bottomItemIndex >= index))
{
_ListViewItemStatus itemStatus;
+ memset(&itemStatus, 0, sizeof(_ListViewItemStatus));
+
_TouchManager* pTouchManager = _TouchManager::GetInstance();
bool needChangeEventTarget = false;
result r = E_SYSTEM;
_UiBuilderControlLayout* pControlProperty = null;
ListView* pListView = null;
- Rectangle rect;
+ FloatRectangle rect;
String elementString;
+ ListScrollStyle scrollStyle = SCROLL_STYLE_FADE_OUT;
+ ScrollInputMode scrollInputMode = SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION;
+
bool hasItemDivider = true;
- bool hasFastScroll = false;
int opacity = 100;
bool isSweepEnabled = false;
Color color;
return null;
}
- rect = pControlProperty->GetRect();
+ rect = pControlProperty->GetRectF();
//Construct
if (pControl->GetElement(L"itemDivider", elementString))
}
}
- if (pControl->GetElement(L"fastScroll", elementString))
+ if (pControl->GetElement(L"listScrollStyle", elementString))
{
- if (elementString.Equals(L"true", false))
+ if (elementString.Equals(L"SCROLL_STYLE_FIXED", false))
{
- hasFastScroll = true;
+ scrollStyle = SCROLL_STYLE_FIXED;
}
- else
+ else if (elementString.Equals(L"SCROLL_STYLE_FAST_SCROLL", false))
{
- hasFastScroll = false;
+ scrollStyle = SCROLL_STYLE_FAST_SCROLL;
+ }
+ else if (elementString.Equals(L"SCROLL_STYLE_JUMP_TO_TOP", false))
+ {
+ scrollStyle = SCROLL_STYLE_JUMP_TO_TOP;
+ }
+ else if (elementString.Equals(L"SCROLL_STYLE_THUMB", false))
+ {
+ scrollStyle = SCROLL_STYLE_THUMB;
}
}
-
- r = pListView->Construct(rect, hasItemDivider, hasFastScroll);
- if (r != E_SUCCESS)
+ else if (pControl->GetElement(L"fastScroll", elementString))
{
- delete pListView;
- pListView = null;
-
- return null;
+ if (elementString.Equals(L"true", false))
+ {
+ scrollStyle = SCROLL_STYLE_FAST_SCROLL;
+ }
}
+ r = pListView->Construct(rect, hasItemDivider, scrollStyle);
+ SysTryCatch(NID_UI, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+
// Set BackgroundsBitmap
if (pControl->GetElement("backgroundBitmapPath", elementString))
{
pBackgroundBitmap = LoadBitmapN(elementString);
if (pBackgroundBitmap != null)
{
- pListView->SetBackgroundBitmap(pBackgroundBitmap);
+ r = pListView->SetBackgroundBitmap(pBackgroundBitmap);
delete pBackgroundBitmap;
pBackgroundBitmap = null;
+
+ SysTryCatch(NID_UI, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
}
}
// Set Empty List
if (pControl->GetElement(L"textOfEmptyList", elementString))
{
- pListView->SetTextOfEmptyList(elementString);
+ r = pListView->SetTextOfEmptyList(elementString);
+ SysTryCatch(NID_UI, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
}
if (pControl->GetElement(L"colorOfEmptyListText", elementString))
{
ConvertStringToColor(elementString, color);
- pListView->SetTextColorOfEmptyList(color);
+ r = pListView->SetTextColorOfEmptyList(color);
+ SysTryCatch(NID_UI, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
}
if (pControl->GetElement(L"bitmapPathOfEmptyList", elementString))
pBackgroundBitmap = LoadBitmapN(elementString); //__image->DecodeN(path,BITMAP_PIXEL_FORMAT_RGB565);
if (pBackgroundBitmap != null)
{
- pListView->SetBitmapOfEmptyList(pBackgroundBitmap);
-
+ r = pListView->SetBitmapOfEmptyList(pBackgroundBitmap);
delete pBackgroundBitmap;
pBackgroundBitmap = null;
+
+ SysTryCatch(NID_UI, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
}
}
if (pControl->GetElement(L"backgroundColor", elementString) || pControl->GetElement(L"BGColor", elementString))
{
ConvertStringToColor32(elementString, opacity, color);
- pListView->SetBackgroundColor(color);
+ r = pListView->SetBackgroundColor(color);
+ SysTryCatch(NID_UI, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
}
if (pControl->GetElement(L"itemDividerColor", elementString))
{
ConvertStringToColor(elementString, color);
- pListView->SetItemDividerColor(color);
+ r = pListView->SetItemDividerColor(color);
+ SysTryCatch(NID_UI, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
}
if (pControl->GetElement(L"sweepEnabled", elementString))
isSweepEnabled = false;
}
- pListView->SetSweepEnabled(isSweepEnabled);
+ r = pListView->SetSweepEnabled(isSweepEnabled);
+ SysTryCatch(NID_UI, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ }
+
+ // scroll Input Mode
+ if (pControl->GetElement(L"scrollInputMode", elementString))
+ {
+ if (elementString.Equals(L"SCROLL_INPUT_MODE_RESTRICT_TO_INITIAL_DIRECTION", false))
+ {
+ scrollInputMode = SCROLL_INPUT_MODE_RESTRICT_TO_INITIAL_DIRECTION;
+ }
+
+ pListView->SetScrollInputMode(scrollInputMode);
}
return pListView;
+
+ CATCH:
+ delete pListView;
+ return null;
}
private:
if (controlOrientation == _CONTROL_ORIENTATION_LANDSCAPE)
{
- GetBuilderBounds(controlOrientation, builderBounds);
+ exist = GetBuilderBounds(controlOrientation, builderBounds);
}
rect = _CoordinateSystemUtils::ConvertToFloat(builderBounds);
float titleLeftMargin = 0.0f;
float titleRightMargin = 0.0f;
+ float transTopMargin = 0.0f;
float transLeftMargin = 0.0f;
float transRightMargin = 0.0f;
GET_SHAPE_CONFIG(POPUP::TITLE_TEXT_LEFT_MARGIN, orientation, titleLeftMargin);
GET_SHAPE_CONFIG(POPUP::TITLE_TEXT_RIGHT_MARGIN, orientation, titleRightMargin);
+ GET_SHAPE_CONFIG(POPUP::BG_IMAGE_TRANSPARENT_TOP_MARGIN, orientation, transTopMargin);
GET_SHAPE_CONFIG(POPUP::BG_IMAGE_TRANSPARENT_LEFT_MARGIN, orientation, transLeftMargin);
GET_SHAPE_CONFIG(POPUP::BG_IMAGE_TRANSPARENT_RIGHT_MARGIN, orientation, transRightMargin);
__pTitleTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_LEFT);
}
__pTitleTextObject->SetBounds(FloatRectangle(titleLeftMargin + transLeftMargin,
- titleTopMargin,
+ titleTopMargin + transTopMargin,
defaultWidth - (titleLeftMargin + titleRightMargin + transLeftMargin + transRightMargin),
titleHeight - titleTopMargin));
__pTitleTextObject->Compose();
__titleBounds = FloatRectangle(titleLeftMargin + transLeftMargin,
- titleTopMargin,
+ titleTopMargin + transTopMargin,
defaultWidth - (titleLeftMargin + titleRightMargin + transLeftMargin + transRightMargin),
titleHeight - titleTopMargin);
}
}
__pBodyTextObject->SetBounds(FloatRectangle(textLeftMargin + transLeftMargin,
- titleHeight + animationWidth + noTitleHeight,
+ titleHeight + textTopMargin + transTopMargin + animationWidth + noTitleHeight,
defaultWidth - (textLeftMargin + textRightMargin + transLeftMargin + transRightMargin),
maxHeight - titleHeight - bottomHeight - animationWidth));
__pBodyTextObject->Compose();
_Scroll* pHorizontalScrollBar = null;
_Scroll* pVerticalScrollBar = null;
- FloatRectangle areaBounds = const_cast<FloatRectangle&>(rect);
+ FloatRectangle areaBounds(rect);
_ScrollPanel* pScrollPanel = new (std::nothrow) _ScrollPanel;
SysTryReturn(NID_UI_CTRL, pScrollPanel != null, null, E_OUT_OF_MEMORY, "[%s] The memory is insufficient.", GetErrorMessage(E_OUT_OF_MEMORY));
void
_ScrollPanelPresenter::OnChildAttached(const _Control& child)
{
- if (&child != __pScrollPanel->GetVerticalScrollBar()
- && &child != __pScrollPanel->GetHorizontalScrollBar())
+ if (child.GetArea() != _CONTROL_AREA_SYSTEM)
{
if (__pScrollPanel->IsScrollAreaAutoResizingEnabled())
{
void
_ScrollPanelPresenter::OnChildDetached(const _Control& child)
{
- if (&child != __pScrollPanel->GetVerticalScrollBar()
- && &child != __pScrollPanel->GetHorizontalScrollBar())
+ if (child.GetArea() != _CONTROL_AREA_SYSTEM)
{
if (__pScrollPanel->IsScrollAreaAutoResizingEnabled())
{
void
_ScrollPanelPresenter::OnChildBoundsChanged(const _Control& child)
{
- if (&child != __pScrollPanel->GetVerticalScrollBar()
- && &child != __pScrollPanel->GetHorizontalScrollBar())
+ if (child.GetArea() != _CONTROL_AREA_SYSTEM)
{
if (__pScrollPanel->IsScrollAreaAutoResizingEnabled())
{
float
_ScrollPanelPresenter::FixScrollPositionIntoScrollAreaBounds(float position, FloatRectangle bounds, FloatRectangle scrollArea) const
{
- float minScrollPos = 0.0f;
- float maxScrollPos = 0.0f;
+ float minScrollPosition = 0.0f;
+ float maxScrollPosition = 0.0f;
if (__pScrollPanel->GetScrollDirection() == SCROLL_PANEL_SCROLL_DIRECTION_HORIZONTAL)
{
- minScrollPos = scrollArea.x;
- maxScrollPos = scrollArea.x + scrollArea.width - bounds.width;
+ minScrollPosition = scrollArea.x;
+ maxScrollPosition = scrollArea.x + scrollArea.width - bounds.width;
}
else
{
- minScrollPos = scrollArea.y;
- maxScrollPos = scrollArea.y + scrollArea.height - bounds.height;
+ minScrollPosition = scrollArea.y;
+ maxScrollPosition = scrollArea.y + scrollArea.height - bounds.height;
+ }
+
+ if (minScrollPosition > maxScrollPosition)
+ {
+ maxScrollPosition = minScrollPosition;
+ }
+ if (position < minScrollPosition)
+ {
+ position = minScrollPosition;
+ }
+ if (position > maxScrollPosition)
+ {
+ position = maxScrollPosition;
}
- position = position < minScrollPos ? minScrollPos : position;
- position = position > maxScrollPos ? maxScrollPos : position;
return position;
}
if (__pScrollPanel->GetScrollDirection() == SCROLL_PANEL_SCROLL_DIRECTION_HORIZONTAL)
{
pageSize = __pScrollPanel->GetPageScrollAlignSize().width;
- maxPosition = GetScrollAreaBounds().width - pageSize;
+ maxPosition = GetScrollAreaBounds().width - __pScrollPanel->GetBoundsF().width;
currentPosition = GetHorizontalScrollPosition();
}
else
{
pageSize = __pScrollPanel->GetPageScrollAlignSize().height;
- maxPosition = GetScrollAreaBounds().height - pageSize;
+ maxPosition = GetScrollAreaBounds().height - __pScrollPanel->GetBoundsF().height;
currentPosition = GetVerticalScrollPosition();
}
float targetPosition = 0.0f;
- float pageGap = currentPosition - (((int)(currentPosition / pageSize)) * pageSize);
int lowerPageIndex = currentPosition / pageSize;
float currentPageMin = pageSize * lowerPageIndex;
+ float pageGap = currentPosition - currentPageMin;
float currentPageMax = currentPageMin + pageSize;
- currentPageMin = currentPageMax > maxPosition ? (maxPosition / pageSize) * pageSize : currentPageMin;
- currentPageMax = currentPageMax > maxPosition ? maxPosition : currentPageMax;
+ if (currentPageMax > maxPosition)
+ {
+ currentPageMax = maxPosition;
+ }
if (pageGap <= currentPageMax - currentPageMin - pageGap)
{
if (__pScrollPanel->GetScrollDirection() == SCROLL_PANEL_SCROLL_DIRECTION_HORIZONTAL)
{
pageSize = __pScrollPanel->GetPageScrollAlignSize().width;
- maxPosition = scrollArea.width - pageSize;
+ maxPosition = scrollArea.width - scrollPanelBounds.width;
scrollPosition = __pScrollPanelModel->GetCurrentHorizontalScrollPosition();
}
else
{
pageSize = __pScrollPanel->GetPageScrollAlignSize().height;
- maxPosition = scrollArea.height - pageSize;
+ maxPosition = scrollArea.height - scrollPanelBounds.height;
scrollPosition = __pScrollPanelModel->GetCurrentVerticalScrollPosition();
}
- float pageGap = scrollPosition - (((int)(scrollPosition / pageSize)) * pageSize);
int lowerPageIndex = (scrollPosition + moveAmount) / pageSize;
float targetPageMin = pageSize * lowerPageIndex;
+ float pageGap = (scrollPosition + moveAmount) - targetPageMin;
float targetPageMax = targetPageMin + pageSize;
- targetPageMin = targetPageMax > maxPosition ? (maxPosition / pageSize) * pageSize : targetPageMin;
- targetPageMax = targetPageMax > maxPosition ? maxPosition : targetPageMax;
if (pageGap <= targetPageMax - targetPageMin - pageGap)
{
_Control* pControl = __pScrollPanel->GetChild(i);
SysTryReturnVoidResult(NID_UI_CTRL, pControl != null, E_SYSTEM, "[%s] pControl(child) is invalid pointer.", GetErrorMessage(E_SYSTEM));
- if (pControl == pVerticalScrollBar || pControl == pHorizontalScrollBar)
+ if (pControl->GetArea() == _CONTROL_AREA_SYSTEM)
{
continue;
}
float targetMaxPos = pControl->GetBoundsF().GetBottomRight().y;
- scrollArea.height = (scrollArea.height < targetMaxPos) ? targetMaxPos : scrollArea.height;
+ if (scrollArea.height < targetMaxPos)
+ {
+ scrollArea.height = targetMaxPos;
+ }
}
}
else if (__pScrollPanel->GetScrollDirection() == SCROLL_PANEL_SCROLL_DIRECTION_HORIZONTAL)
_Control* pControl = __pScrollPanel->GetChild(i);
SysTryReturnVoidResult(NID_UI_CTRL, pControl != null, E_SYSTEM, "[%s] pControl(child) is invalid pointer.", GetErrorMessage(E_SYSTEM));
- if (pControl == pVerticalScrollBar || pControl == pHorizontalScrollBar)
+ if (pControl->GetArea() == _CONTROL_AREA_SYSTEM)
{
continue;
}
float targetMaxPos = pControl->GetBoundsF().GetBottomRight().x;
- scrollArea.width = (scrollArea.width < targetMaxPos) ? targetMaxPos : scrollArea.width;
+ if (scrollArea.width < targetMaxPos)
+ {
+ scrollArea.width = targetMaxPos;
+ }
}
}
}
scrollArea = GetScrollAreaBounds();
if (scrollDirection == SCROLL_PANEL_SCROLL_DIRECTION_HORIZONTAL)
{
- scrollArea.width = scrollArea.width < scrollPanelBounds.width ? scrollPanelBounds.width : scrollArea.width;
+ if (scrollArea.width < scrollPanelBounds.width)
+ {
+ scrollArea.width = scrollPanelBounds.width;
+ }
scrollArea.height = scrollPanelBounds.height;
}
else
{
scrollArea.width = scrollPanelBounds.width;
- scrollArea.height = scrollArea.height < scrollPanelBounds.height ? scrollPanelBounds.height : scrollArea.height;
+ if (scrollArea.height < scrollPanelBounds.height)
+ {
+ scrollArea.height = scrollPanelBounds.height;
+ }
}
}
result SetEventPropagation(const _Control& control, bool enable);
result SetFocus(const _Control& control, bool focus);
- void SetQuickPanelScrollEnabled(const _Window& window, bool enable);
- bool IsQuickPanelScrollEnabled(const _Window& window);
result SetIndicatorShowState(const _Window& window, bool showState);
bool GetIndicatorShowState(const _Window& window) const;
Ecore_Evas* GetEcoreEvas(void) const;
Evas_Object* GetWindowObject(void) const;
Ecore_X_Window GetXWindow(void) const;
+ void SetQuickPanelScrollEnabled(const _Window& window, bool enable);
+ bool IsQuickPanelScrollEnabled(const _Window& window);
private:
Tizen::Ui::Animations::_EflLayer* GetEflLayer(const _Window& window) const;
ADD_SHAPE_CONFIG(BG_IMAGE_TRANSPARENT_RIGHT_MARGIN, 16);
ADD_SHAPE_CONFIG(BUTTON_HEIGHT, 74); // 20121113
- ADD_SHAPE_CONFIG(BUTTON_INTERNAL_GAP, 20); // 20121113
+ ADD_SHAPE_CONFIG(BUTTON_INTERNAL_GAP, 16); // 20130404
ADD_SHAPE_CONFIG(BUTTON_TOP_MARGIN, 20); // 20121113
ADD_SHAPE_CONFIG(BUTTON_BOTTOM_MARGIN, 24); // 20130403