Merge lp:~fboucault/qtubuntu/orientation_sidestage_fix into lp:qtubuntu

Proposed by Loïc Molinari
Status: Merged
Approved by: Florian Boucault
Approved revision: 128
Merged at revision: 129
Proposed branch: lp:~fboucault/qtubuntu/orientation_sidestage_fix
Merge into: lp:qtubuntu
Diff against target: 14 lines (+2/-2)
1 file modified
src/platforms/ubuntu/screen.cc (+2/-2)
To merge this branch: bzr merge lp:~fboucault/qtubuntu/orientation_sidestage_fix
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Ubuntu Phablet Team Pending
Review via email: mp+161121@code.launchpad.net

Commit message

Based native orientation selection on the available stage size.

Description of the change

Based native orientation selection on the available stage size.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/platforms/ubuntu/screen.cc'
2--- src/platforms/ubuntu/screen.cc 2013-03-01 14:51:45 +0000
3+++ src/platforms/ubuntu/screen.cc 2013-04-26 13:38:41 +0000
4@@ -101,8 +101,8 @@
5
6 DLOG("QUbuntuScreen::QUbuntuScreen (this=%p)", this);
7
8- // Set the default orientation based on the initial screen dimmensions.
9- nativeOrientation_ = (kScreenWidth >= kScreenHeight) ? Qt::LandscapeOrientation : Qt::PortraitOrientation;
10+ // Set the default orientation based on the initial stage dimensions.
11+ nativeOrientation_ = (availableGeometry_.width() >= availableGeometry_.height()) ? Qt::LandscapeOrientation : Qt::PortraitOrientation;
12
13 // If it's a landscape device (i.e. some tablets), start in landscape, otherwise portrait
14 currentOrientation_ = (nativeOrientation_ == Qt::LandscapeOrientation) ? Qt::LandscapeOrientation : Qt::PortraitOrientation;

Subscribers

People subscribed via source and target branches