Commit 7f0ca39374aebd1e1ddab319badcc2a38e00aa43
1 parent
9ba54162
Use Orientation from Window not application class.
Change-Id: I426313377c97b638fefdb376139f5fa03550ae49
Showing
3 changed files
with
9 additions
and
8 deletions
demo/dali-table-view.cpp
| ... | ... | @@ -324,17 +324,18 @@ void DaliTableView::Initialize( Application& application ) |
| 324 | 324 | // Remove constraints for inner cube effect |
| 325 | 325 | ApplyCubeEffectToActors(); |
| 326 | 326 | |
| 327 | - // Set initial orientation | |
| 328 | - unsigned int degrees = application.GetOrientation().GetDegrees(); | |
| 329 | - Rotate( degrees ); | |
| 330 | - | |
| 331 | 327 | Dali::Window winHandle = application.GetWindow(); |
| 332 | 328 | winHandle.AddAvailableOrientation( Dali::Window::PORTRAIT ); |
| 333 | 329 | winHandle.RemoveAvailableOrientation( Dali::Window::LANDSCAPE ); |
| 334 | 330 | winHandle.AddAvailableOrientation( Dali::Window::PORTRAIT_INVERSE ); |
| 335 | 331 | winHandle.RemoveAvailableOrientation( Dali::Window::LANDSCAPE_INVERSE ); |
| 336 | 332 | |
| 333 | + // Set initial orientation | |
| 337 | 334 | Dali::Orientation orientation = winHandle.GetOrientation(); |
| 335 | + | |
| 336 | + unsigned int degrees = winHandle.GetOrientation().GetDegrees(); | |
| 337 | + Rotate( degrees ); | |
| 338 | + | |
| 338 | 339 | orientation.ChangedSignal().Connect( this, &DaliTableView::OrientationChanged ); |
| 339 | 340 | |
| 340 | 341 | winHandle.ShowIndicator( Dali::Window::INVISIBLE ); | ... | ... |
examples/motion-blur/motion-blur-example.cpp
| ... | ... | @@ -193,8 +193,8 @@ public: |
| 193 | 193 | winHandle.AddAvailableOrientation( Dali::Window::LANDSCAPE_INVERSE ); |
| 194 | 194 | |
| 195 | 195 | // set initial orientation |
| 196 | - app.GetOrientation().ChangedSignal().Connect( this, &MotionBlurExampleApp::OnOrientationChanged ); | |
| 197 | - unsigned int degrees = app.GetOrientation().GetDegrees(); | |
| 196 | + winHandle.GetOrientation().ChangedSignal().Connect( this, &MotionBlurExampleApp::OnOrientationChanged ); | |
| 197 | + unsigned int degrees = winHandle.GetOrientation().GetDegrees(); | |
| 198 | 198 | Rotate( static_cast< DeviceOrientation >( degrees ) ); |
| 199 | 199 | |
| 200 | 200 | ... | ... |
examples/motion-stretch/motion-stretch-example.cpp
| ... | ... | @@ -166,8 +166,8 @@ public: |
| 166 | 166 | winHandle.AddAvailableOrientation( Dali::Window::PORTRAIT_INVERSE ); |
| 167 | 167 | winHandle.AddAvailableOrientation( Dali::Window::LANDSCAPE_INVERSE ); |
| 168 | 168 | |
| 169 | - app.GetOrientation().ChangedSignal().Connect( this, &MotionStretchExampleApp::OnOrientationChanged ); | |
| 170 | - unsigned int degrees = app.GetOrientation().GetDegrees(); | |
| 169 | + winHandle.GetOrientation().ChangedSignal().Connect( this, &MotionStretchExampleApp::OnOrientationChanged ); | |
| 170 | + unsigned int degrees = winHandle.GetOrientation().GetDegrees(); | |
| 171 | 171 | Rotate( static_cast< DeviceOrientation >( degrees ) ); |
| 172 | 172 | |
| 173 | 173 | ... | ... |