Fixed Nabi Issues and Hardware Key Implementation
[apps/osp/Internet.git] / src / IntHistoryListForm.cpp
index 288ccc6..5fe41f4 100644 (file)
@@ -112,13 +112,20 @@ HistoryListForm::OnInitializing(void)
        Bitmap *pIconBitmap = null;
        AppResource* pAppResource = UiApp::GetInstance()->GetAppResource();
        const Color brown = Color(32, 32, 32, 0xFF);
-
+//     bool isHwBackButtonExist = false;
+//     Tizen::System::SystemInfo::GetValue(L"http:://tizen.org/feature/input.back.key",isHwBackButtonExist);
+//
+//     SetFormStyle(FORM_STYLE_INDICATOR | FORM_STYLE_HEADER | FORM_STYLE_FOOTER);
        // Setup back event listener
        SetFormBackEventListener(this);
 
        GetHeader()->AddActionEventListener(*this);
        GetFooter()->AddActionEventListener(*this);
 
+//     if(isHwBackButtonExist)
+//     {
+//             GetFooter()->SetBackButtonEnabled(false);
+//     }
        AddOrientationEventListener(*this);
        SettingInfo::AddSettingEventListener(*this);
 
@@ -128,6 +135,7 @@ HistoryListForm::OnInitializing(void)
                pSceneManager->AddSceneEventListener(IDSCN_HISTORY_LIST, *this);
        }
 
+       __fontSize = CommonUtil::GetFontSize();
        if (pAppResource == null)
        {
                return E_FAILURE;
@@ -533,7 +541,7 @@ HistoryListForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
                delete pItem;
                return null;
        }
-       r = pItem->Construct(Dimension(itemWidth, 128), LIST_ANNEX_STYLE_NORMAL);
+       r = pItem->Construct(Dimension(itemWidth, 128 - 44 + __fontSize), LIST_ANNEX_STYLE_NORMAL);
        if (IsFailed(r))
        {
                delete pItem;
@@ -567,7 +575,7 @@ HistoryListForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
        }
        if (pBitmap != null)
        {
-               r = pItem->AddElement(Rectangle(16, 28,72, 72), IDA_FORMAT_ICON, *pBitmap, null);
+               r = pItem->AddElement(Rectangle(16, 28 + (__fontSize - 44)/2,72, 72), IDA_FORMAT_ICON, *pBitmap, null);
                delete pBitmap;
                if (IsFailed(r))
                {
@@ -601,17 +609,17 @@ HistoryListForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
        bookmarkBtnWidth = 64;
 
 
-       r = pItem->AddElement(Rectangle(104, 10, GetClientAreaBounds().width - 108 - 32 - bookmarkBtnWidth - 32, 60), IDA_FORMAT_TITLE, pHistory->GetHistoryTitle(), 44,CUSTOM_COLOR_TRANSPARENT,CUSTOM_COLOR_TRANSPARENT,CUSTOM_COLOR_TRANSPARENT,true);
+       r = pItem->AddElement(Rectangle(104, 10, GetClientAreaBounds().width - 108 - 32 - bookmarkBtnWidth - 32, 60 - 44 + __fontSize), IDA_FORMAT_TITLE, pHistory->GetHistoryTitle(), __fontSize,CUSTOM_COLOR_TRANSPARENT,CUSTOM_COLOR_TRANSPARENT,CUSTOM_COLOR_TRANSPARENT,true);
        TryCatch(!IsFailed(r), "CreateItem failed with %s",GetErrorMessage(r));
 
 //     if(__pSearchBar->GetMode() == SEARCH_BAR_MODE_INPUT)
 //             r = pItem->AddElement(Rectangle(104, 70, GetClientAreaBounds().width - 108 - 32 - bookmarkBtnWidth - 32, 48), IDA_FORMAT_URL, pHistory->GetHistoryUrl(),32,CUSTOM_COLOR_TRANSPARENT,CUSTOM_COLOR_TRANSPARENT,CUSTOM_COLOR_TRANSPARENT,true);
 //     else
-               r = pItem->AddElement(Rectangle(104, 70, GetClientAreaBounds().width - 108 - 32 - bookmarkBtnWidth - 32, 48), IDA_FORMAT_URL, pHistory->GetHistoryUrl(),32,CUSTOM_COLOR_GREY,CUSTOM_COLOR_GREY,CUSTOM_COLOR_GREY,true);
+               r = pItem->AddElement(Rectangle(104, 70 - 44 +__fontSize, GetClientAreaBounds().width - 108 - 32 - bookmarkBtnWidth - 32, 48), IDA_FORMAT_URL, pHistory->GetHistoryUrl(),32,CUSTOM_COLOR_GREY,CUSTOM_COLOR_GREY,CUSTOM_COLOR_GREY,true);
        TryCatch(!IsFailed(r), "CreateItem failed with %s",GetErrorMessage(r));
        if ( pBookmarkBitmap != null)
        {
-               r = pItem->AddElement(Rectangle(GetClientAreaBounds().width - bookmarkBtnWidth - 16, (128 - pBookmarkBitmap->GetHeight())/2, bookmarkBtnWidth, bookmarkBtnWidth), IDA_FORMAT_BOOKMARK, *pBookmarkBitmap);
+               r = pItem->AddElement(Rectangle(GetClientAreaBounds().width - bookmarkBtnWidth - 16, (128 - pBookmarkBitmap->GetHeight())/2 +(__fontSize - 44)/2, bookmarkBtnWidth, bookmarkBtnWidth), IDA_FORMAT_BOOKMARK, *pBookmarkBitmap);
                TryCatch(!IsFailed(r), "CreateItem failed with %s",GetErrorMessage(r));
                delete pBookmarkBitmap;
        }
@@ -1138,6 +1146,7 @@ HistoryListForm::OnKeypadActionPerformed(Control &source, KeypadAction keypadAct
                __pSearchListView->SetEnabled(true);
                __searchHistory = true;
                __searchText =__pSearchBar->GetText();
+               AppLog("SearchTextHistory %S errormsg %s",__searchText.GetPointer(),GetErrorMessage(GetLastResult()));
 
                r = __pGroupedListView->SetShowState(false);
                if (IsFailed(r))