From d1d28bf1c47023d4bcd3358449baade3b797eb3b Mon Sep 17 00:00:00 2001 From: Wonsik Jung Date: Fri, 20 Dec 2019 16:04:18 +0900 Subject: Add to check disply size for rotation Add to check disply size for rotation If the screen's width is greater than the height, AddAvailable is called with LANDSCAPE. Otherwise for the other case, AddAvailable is called with PORTRAIT. Change-Id: Id99ca9a2b840411194613d82f0f7870e2c81b79c --- shared/dali-table-view.cpp | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/shared/dali-table-view.cpp b/shared/dali-table-view.cpp index 3760172f..aba375ab 100644 --- a/shared/dali-table-view.cpp +++ b/shared/dali-table-view.cpp @@ -287,10 +287,21 @@ void DaliTableView::Initialize( Application& application ) ApplyCubeEffectToPages(); Dali::Window winHandle = application.GetWindow(); - winHandle.AddAvailableOrientation( Dali::Window::PORTRAIT ); - winHandle.RemoveAvailableOrientation( Dali::Window::LANDSCAPE ); - winHandle.AddAvailableOrientation( Dali::Window::PORTRAIT_INVERSE ); - winHandle.RemoveAvailableOrientation( Dali::Window::LANDSCAPE_INVERSE ); + + if( stageSize.width <= stageSize.height ) + { + winHandle.AddAvailableOrientation( Dali::Window::PORTRAIT ); + winHandle.RemoveAvailableOrientation( Dali::Window::LANDSCAPE ); + winHandle.AddAvailableOrientation( Dali::Window::PORTRAIT_INVERSE ); + winHandle.RemoveAvailableOrientation( Dali::Window::LANDSCAPE_INVERSE ); + } + else + { + winHandle.AddAvailableOrientation( Dali::Window::LANDSCAPE ); + winHandle.RemoveAvailableOrientation( Dali::Window::PORTRAIT ); + winHandle.AddAvailableOrientation( Dali::Window::LANDSCAPE_INVERSE ); + winHandle.RemoveAvailableOrientation( Dali::Window::PORTRAIT_INVERSE ); + } // Set initial orientation unsigned int degrees = 0; -- cgit v1.2.3 From ba50290758b29ca7a600c25a0859d6c4c123e2ee Mon Sep 17 00:00:00 2001 From: Cheng-Shiun Tsai Date: Fri, 20 Dec 2019 10:33:15 +0000 Subject: DALi Version 1.4.51 Change-Id: Ibfcbe2e6e736ac2a7782d0ef0b77caef31328d4a --- packaging/com.samsung.dali-demo.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/com.samsung.dali-demo.spec b/packaging/com.samsung.dali-demo.spec index 7f49403b..f40233ac 100755 --- a/packaging/com.samsung.dali-demo.spec +++ b/packaging/com.samsung.dali-demo.spec @@ -2,7 +2,7 @@ Name: com.samsung.dali-demo Summary: The OpenGLES Canvas Core Demo -Version: 1.4.50 +Version: 1.4.51 Release: 1 Group: System/Libraries License: Apache-2.0 -- cgit v1.2.3