Apply GUI
authorChoi Munseok <ms47.choi@samsung.com>
Thu, 17 Jan 2013 10:59:58 +0000 (19:59 +0900)
committerChoi Munseok <ms47.choi@samsung.com>
Thu, 17 Jan 2013 10:59:58 +0000 (19:59 +0900)
Change-Id: Iacf323b9e2f5ab572ca0396e6b1d793a67962d08
Signed-off-by: Choi Munseok <ms47.choi@samsung.com>
project/res/screen-size-normal/IDF_FORM.xml
project/src/LiveboxViewerMainForm.cpp

index 805ecc9..4e928f7 100644 (file)
@@ -15,7 +15,7 @@
         <itemSet/>
     </Footer>
     <Header>
-        <property backgroundBitmapPath="" color="" colorOpacity="0" descriptionText="" descriptionTextColor="" disabledButtonColor="" disabledButtonColorOpacity="0" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="0" disabledItemTextColor="" headerStyle="HEADER_STYLE_TITLE" highlightedButtonColor="" highlightedButtonColorOpacity="0" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="0" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="0" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="0" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="0" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="0" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="0" selectedItemTextColor="" titleIconPath="" titleText="Hello Livebox!" titleTextColor=""/>
+        <property backgroundBitmapPath="" color="" colorOpacity="0" descriptionText="" descriptionTextColor="" disabledButtonColor="" disabledButtonColorOpacity="0" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="0" disabledItemTextColor="" headerStyle="HEADER_STYLE_TITLE" highlightedButtonColor="" highlightedButtonColorOpacity="0" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="0" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="0" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="0" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="0" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="0" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="0" selectedItemTextColor="" titleIconPath="" titleText="LIVEBOX VIEWER" titleTextColor=""/>
         <itemSet/>
     </Header>
 </Scene>
index ed556dc..500a6ff 100644 (file)
@@ -14,6 +14,11 @@ using namespace Tizen::Ui::Controls;
 using namespace Tizen::Ui::Scenes;
 using namespace Tizen::Shell;
 
+const int LIST_ITEM_HEIGHT = 112;
+const int LIST_ITEM_MARGIN_LEFT = 26;
+const int LIST_ITEM_MARGIN_TOP = 32;
+const int LIST_ITEM_TEXT_HEIGHT = 44;
+
 LiveboxViewerMainForm::LiveboxViewerMainForm(void)
        : __pList(null)
        , __pLiveboxProviderList(null)
@@ -182,14 +187,16 @@ Tizen::Ui::Controls::ListItemBase*
 LiveboxViewerMainForm::CreateItem (int index, int itemWidth)
 {
        ListAnnexStyle style = LIST_ANNEX_STYLE_NORMAL;
+       
        CustomItem* pItem = new (std::nothrow) CustomItem();
-       pItem->Construct(Tizen::Graphics::Dimension(itemWidth, 112), style);
-       Rectangle mainListItemRect(10, 25, GetClientAreaBounds().width, 50);
+       pItem->Construct(Tizen::Graphics::Dimension(itemWidth, LIST_ITEM_HEIGHT), style);
+       
+       Rectangle itemRect(LIST_ITEM_MARGIN_LEFT, LIST_ITEM_MARGIN_TOP, GetClientAreaBounds().width - (LIST_ITEM_MARGIN_LEFT * 2), LIST_ITEM_TEXT_HEIGHT);
        
        LiveboxProviderInfo* pProviderInfo = dynamic_cast<LiveboxProviderInfo*>(__pLiveboxProviderList->GetAt(index));
        if (pProviderInfo)
        {
-               pItem->AddElement(mainListItemRect, ID_FORMAT_STRING, pProviderInfo->GetDisplayName()+" ("+pProviderInfo->GetAppId()+")", true);
+               pItem->AddElement(itemRect, ID_FORMAT_STRING, pProviderInfo->GetDisplayName()+" ("+pProviderInfo->GetAppId()+")", true);
        }
 
        return pItem;