Fixed position error of context menu box
authorJongTaeOh <jongtae.oh@samsung.com>
Wed, 27 Mar 2013 02:35:18 +0000 (11:35 +0900)
committerJongTaeOh <jongtae.oh@samsung.com>
Wed, 27 Mar 2013 02:35:18 +0000 (11:35 +0900)
Change-Id: Iecea3cecc7421f393ac1b516b325f158a6c4b75d

src/MpAllListPanel.cpp
src/MpCommonUtil.cpp
src/MpMusicPlayerApp.cpp

index dda5151..f8e3154 100644 (file)
@@ -181,7 +181,9 @@ AllListPanel::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
                {
                        Point itemPoint;
 
-                       int screenHeight = CoordinateSystem::GetLogicalResolution().height;
+                       Form *pForm = dynamic_cast<Form*>(GetParent());
+                       AppAssert(pForm);
+                       int screenHeight = pForm->GetHeight();
                        Point convertPosition = source.ConvertToScreenPosition(Point(source.GetWidth() / 2, 0));
                        itemPoint.x = convertPosition.x;
                        itemPoint.y = convertPosition.y + source.GetHeight();
index d87de5e..c52a466 100644 (file)
@@ -29,6 +29,7 @@ using namespace Tizen::Base::Utility;
 using namespace Tizen::Content;
 using namespace Tizen::Graphics;
 using namespace Tizen::Io;
+using namespace Tizen::Ui::Scenes;
 using namespace Tizen::Ui;
 using namespace Tizen::Ui::Controls;
 
@@ -984,7 +985,16 @@ Tizen::Ui::Controls::ContextMenu*
 CommonUtil::CreateContextMenuN(const Tizen::Ui::Control& source, Tizen::Ui::IActionEventListener& listener)
 {
        AppLogDebug("ENTER");
-       int screenHeight = CoordinateSystem::GetLogicalResolution().height;
+
+       SceneManager* pSceneManager = SceneManager::GetInstance();
+       AppAssert(pSceneManager);
+
+       Scene* pScene = pSceneManager->GetCurrentScene();
+       AppAssert(pScene);
+       Form *pForm = pScene->GetForm();
+       AppAssert(pForm);
+
+       int screenHeight = pForm->GetHeight();
        Point convertPosition = source.ConvertToScreenPosition(Point(source.GetWidth() / 2, 0));
        Point itemPoint(convertPosition.x, convertPosition.y + source.GetHeight());
 
@@ -2060,4 +2070,4 @@ CommonUtil::SetHighDepthToEllipsisPath(const Tizen::Base::String& fullFilePath)
 
        AppLogDebug("EXIT");
        return folderPath;
-}
\ No newline at end of file
+}
index 53613ad..05e6e70 100644 (file)
@@ -175,7 +175,7 @@ MusicPlayerApp::OnForeground(void)
        AppAssert(pSceneManager);
 
        Scene* pScene = pSceneManager->GetCurrentScene();
-       AppAssert(pSceneManager);
+       AppAssert(pScene);
 
        BasePanel* pBasePanel = dynamic_cast<BasePanel*>(pScene->GetPanel());
        PlayerForm* pBaseForm = dynamic_cast<PlayerForm*>(pScene->GetForm());