Landscape implementation Gallery
[apps/osp/Gallery.git] / src / GlImageListEditorPanel.cpp
index 11218cd..bef75fe 100644 (file)
@@ -419,6 +419,8 @@ ImageListEditorPanel::OnSceneActivatedN(const SceneId& previousSceneId,
 {
        AppLogDebug("ENTER");
 
+       ChangeOrientation();
+
        SceneManager* pSceneManager = SceneManager::GetInstance();
        __pFileListEditorForm = dynamic_cast<FileListEditorForm*>(pSceneManager->GetCurrentScene()->GetForm());
 
@@ -638,3 +640,16 @@ ImageListEditorPanel::SetButtonState(void)
        }
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 }
+
+void
+ImageListEditorPanel::ChangeOrientation(void)
+{
+       AppLogDebug("ENTER");
+       SceneManager* pSceneManager = SceneManager::GetInstance();
+       const Form* pForm = dynamic_cast<Form*>(pSceneManager->GetCurrentScene()->GetForm());
+       TryReturn(pForm != null, , "[%s] fail to get the form.", GetErrorMessage(GetLastResult()));
+
+       Rectangle clientAreaBounds = pForm->GetClientAreaBounds();
+       SetBounds(0, 0, clientAreaBounds.width, clientAreaBounds.height);
+       __pContentIconListView->SetBounds(0, 0, clientAreaBounds.width, clientAreaBounds.height);
+}