Landscape implementation Gallery
[apps/osp/Gallery.git] / src / GlAllListPanel.cpp
index e7590a6..baa1479 100644 (file)
@@ -312,11 +312,26 @@ AllListPanel::OnThumbnailDecoded(const int index)
 }
 
 void
+AllListPanel::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);
+}
+
+void
 AllListPanel::OnSceneActivatedN(const SceneId& previousSceneId,
                                                                const SceneId& currentSceneId, IList* pArgs)
 {
        AppLogDebug("ENTER");
 
+       ChangeOrientation();
+
        __pPresentationModel = FileListPresentationModel::GetInstance();
 
        if (currentSceneId == IDSCN_ALL_LIST)