Fixed ContextMenu
authorHeeJu Kang <mobum.kang@samsung.com>
Sun, 23 Dec 2012 04:45:16 +0000 (13:45 +0900)
committerHeeJu Kang <mobum.kang@samsung.com>
Sun, 23 Dec 2012 04:45:16 +0000 (13:45 +0900)
Change-Id: I2f84d94834a7b4f5b7c33811d4e135fcc7687683
Signed-off-by: HeeJu Kang <mobum.kang@samsung.com>
project/src/ViewForm.cpp

index e977bb4..7cf30ef 100644 (file)
@@ -79,7 +79,7 @@ ViewForm::CreateLiveboxView(const Tizen::Base::String& appId, const Tizen::Base:
        }
 
        __pContextMenu = new (std::nothrow) ContextMenu();
-       __pContextMenu->Construct(Point(CONTEXT_MENU_X, CONTEXT_MENU_Y), CONTEXT_MENU_STYLE_LIST, CONTEXT_MENU_ANCHOR_DIRECTION_DOWNWARD);
+       __pContextMenu->Construct(Point(CONTEXT_MENU_X, CONTEXT_MENU_Y), CONTEXT_MENU_STYLE_LIST);
 
        std::unique_ptr<LiveboxProviderInfo> pProviderInfo(LiveboxManager::GetInstance()->GetLiveboxProviderInfoN(appId, providerName ));
        TryReturnVoid(pProviderInfo.get(), "pProviderInfo is null!!");
@@ -105,14 +105,12 @@ ViewForm::CreateLiveboxView(const Tizen::Base::String& appId, const Tizen::Base:
        }
 
        Rectangle formBounds = GetBounds();
-       Rectangle contextMenuBounds = __pContextMenu->GetBounds();
-       Point anchor = __pContextMenu->GetAnchorPosition();
-       anchor.y = formBounds.height - contextMenuBounds.height;
+       Footer* pFooter = GetFooter();
+       Rectangle footerBounds = pFooter->GetBounds();
 
-       AppLog("(%d %d %d %d) (%d %d)", contextMenuBounds.x, contextMenuBounds.y, contextMenuBounds.width, contextMenuBounds.height, anchor.x, anchor.y);
+       Point anchor(formBounds.width / 2, formBounds.height - footerBounds.height);
 
        __pContextMenu->SetAnchorPosition(anchor);
-
        __pContextMenu->AddActionEventListener(*this);
 }