result
-_SelectBox::Construct(bool isMultiSelect, const String& title, int listItemCnt, Evas_Object* pWebView)
+_SelectBox::Construct(bool isMultiSelect, const String& title, int listCount, Evas_Object* pWebView)
{
result r = E_SUCCESS;
Rectangle rect;
- int listCount = 4;
int listItemHeight = 0;
int listMaxHeihgt = 0;
int popupWinTopMargin = 0;
listMaxHeihgt = listCount * listItemHeight + pPopupData->btnDim.height + 2 * ( pPopupData->spacePad + popupWinTopMargin + popupWinBottomMargin);
- rect.height = Max< int >(listMaxHeihgt, pPopupData->popupDim.height);
+ rect.height = listMaxHeihgt;
rect.width = pPopupData->popupDim.width;
rect.x = 0;
rect.y = 0;
static const int PORTRAIT_KEYPAD_HEIGHT = 444;
static const int LANDSCAPE_KEYPAD_HEIGHT = 316;
+static const int DEFAULT_LIST_ITEM_COUNT = 4;
Eina_Bool
{
__pSelectBox.reset();
- int itemCount = eina_list_count(pItems);
- SysTryReturnResult(NID_WEB_CTRL, itemCount > 0, E_SYSTEM, "ItemCount is invalid.");
+ SysTryReturnResult(NID_WEB_CTRL, eina_list_count(pItems) > 0, E_SYSTEM, "ItemCount is invalid.");
result r = E_SUCCESS;
std::unique_ptr<_SelectBox> pSelectBox(new (std::nothrow) _SelectBox());
SysTryReturnResult(NID_WEB_CTRL, pSelectBox.get(), E_OUT_OF_MEMORY, "Memory allocation failed.");
- r = pSelectBox->Construct(isMultiSelect, title, itemCount, pWebView);
+ r = pSelectBox->Construct(isMultiSelect, title, DEFAULT_LIST_ITEM_COUNT, pWebView);
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
r = pSelectBox->UpdateList(pItems, selectedIndex, false, false);