#include <FApp.h>
#include <FUiControls.h>
+#include "IntCommonLib.h"
#include "IntDropDownCustomItem.h"
#include "IntTypes.h"
using namespace Tizen::Graphics;
using namespace Tizen::Ui::Controls;
-static const wchar_t* IDB_LIST_EXPAND_CLOSED = L"00_circle_button_Expand_closed.png";
-static const wchar_t* IDB_LIST_EXPAND_CLOSED_PRESS = L"00_list_expand_closed_press.png";
-static const wchar_t* IDB_LIST_EXPAND_OPENED = L"00_circle_button_Expand_open.png";
-static const wchar_t* IDB_LIST_EXPAND_OPENED_PRESS = L"00_list_expand_opened_press.png";
+static const wchar_t* IDB_LIST_EXPAND_CLOSED = L"00_button_expand_closed.png";
+static const wchar_t* IDB_LIST_EXPAND_CLOSED_PRESS = L"00_button_expand_closed_press.png";
+static const wchar_t* IDB_LIST_EXPAND_OPENED = L"00_button_expand_opened.png";
+static const wchar_t* IDB_LIST_EXPAND_OPENED_PRESS = L"00_button_expand_opened_press.png";
const int DropDownCustomItem::IDA_FORMAT_BITMAP = 101;
const int DropDownCustomItem::IDA_FORMAT_MAIN_STRING = 102;
{
result r = E_SUCCESS;
__width = width;
- __height = 140;
+ __fontSize = CommonUtil::GetFontSize();
+ __height = 140 + (__fontSize - 44);
Dimension dim(__width, __height);
r = CustomItem::Construct(dim, LIST_ANNEX_STYLE_NORMAL);
return r;
Tizen::Graphics::Bitmap* pDropperBitmapPressed = null;
pMainEnText = new(std::nothrow) EnrichedText();
- r = pMainEnText->Construct(Dimension(__width - 80, 54));
+ r = pMainEnText->Construct(Dimension(__width - 80, 54 + (__fontSize - 44)));
if(IsFailed(r))
{
delete pMainEnText;
pMainTextElement = new(std::nothrow) TextElement();
pMainTextElement->Construct(__mainText);
- mainTextFont.Construct(FONT_STYLE_BOLD, 44);
+ mainTextFont.Construct(FONT_STYLE_BOLD, __fontSize);
Color pressedTextColor = CUSTOM_COLOR_LISTVIEW_TEXT;
pMainTextElement->SetFont(mainTextFont);
}
pSubTextElement = new(std::nothrow) TextElement();
- pSubTextElement->Construct(__subText);
+ r = pSubTextElement->Construct(__subText);
+ if(IsFailed(r))
+ {
+ pMainEnText->RemoveAll(true);
+ delete pMainEnText;
+ delete pSubEnText;
+ delete pSubTextElement;
+ return E_FAILURE;
+ }
subTextFont.Construct(FONT_STYLE_PLAIN, 32);
pSubTextElement->SetTextColor(CUSTOM_COLOR_GREY);
pSubEnText->Add(*pSubTextElement);
- r = AddElement(Rectangle(26, 22, __width - 126, 54), IDA_FORMAT_MAIN_STRING, *pMainEnText);
- r = AddElement(Rectangle(26, 76, __width - 126, 42), IDA_FORMAT_SUB_STRING, *pSubEnText);
+ r = AddElement(Rectangle(26, 22, __width - 126, 72 + (__fontSize - 44)), IDA_FORMAT_MAIN_STRING, *pMainEnText);
+ r = AddElement(Rectangle(26, 76 + (__fontSize - 44), __width - 126, 42), IDA_FORMAT_SUB_STRING, *pSubEnText);
if(IsFailed(r))
{
pMainEnText->RemoveAll(true);
pDropperBitmapPressed = pAppResource->GetBitmapN(IDB_LIST_EXPAND_OPENED_PRESS, BITMAP_PIXEL_FORMAT_ARGB8888);
}
- AddElement(Rectangle(__width - pDropperBitmapNormal->GetWidth() - 12, (__height - 74) / 2, 74, 74), IDA_FORMAT_DROPPER, *pDropperBitmapNormal, pDropperBitmapNormal, pDropperBitmapNormal);
+ AddElement(Rectangle(__width - pDropperBitmapNormal->GetWidth() - 12, (__height - pDropperBitmapNormal->GetHeight()) / 2 + (__fontSize - 44)/2, pDropperBitmapNormal->GetWidth(), pDropperBitmapNormal->GetHeight()), IDA_FORMAT_DROPPER, *pDropperBitmapNormal, pDropperBitmapNormal, pDropperBitmapNormal);
delete pDropperBitmapNormal;
delete pDropperBitmapPressed;
}