Merge lp:~vthompson/music-app/fix-orientation into lp:~ahayzen/music-app/refactor-pull-now-playing-sidebar

Proposed by Victor Thompson
Status: Merged
Approved by: Andrew Hayzen
Approved revision: 854
Merged at revision: 854
Proposed branch: lp:~vthompson/music-app/fix-orientation
Merge into: lp:~ahayzen/music-app/refactor-pull-now-playing-sidebar
Diff against target: 14 lines (+2/-2)
1 file modified
app/music-app.qml (+2/-2)
To merge this branch: bzr merge lp:~vthompson/music-app/fix-orientation
Reviewer Review Type Date Requested Status
Andrew Hayzen Approve
Review via email: mp+265622@code.launchpad.net

Commit message

Update orientation/landscape determination

Description of the change

Update orientation/landscape determination

Currently the solution in the MP doesn't work when things are rotated. I think we need to go back to the older way of determining that we are "landscape". Really what this means is that the height follows logically as you rotate the device so the app shouldn't need to know the orientation.

To post a comment you must log in.
Revision history for this message
Andrew Hayzen (ahayzen) wrote :

Works well, I think we should be able to remove the import for the sensor as well? But I'll do that in my branch.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'app/music-app.qml'
2--- app/music-app.qml 2015-06-28 03:17:10 +0000
3+++ app/music-app.qml 2015-07-23 02:16:55 +0000
4@@ -283,8 +283,8 @@
5
6 signal listItemSwiping(int i)
7
8- property bool landscape: orientationSensor.reading !== null && (orientationSensor.reading.orientation === OrientationReading.LeftUp || orientationSensor.reading.orientation === OrientationReading.RightUp)
9- property bool wideAspect: loadedUI && (landscape ? height >= units.gu(70) : width >= units.gu(70))
10+ property bool landscape: width > height
11+ property bool wideAspect: loadedUI && landscape && width >= units.gu(70)
12 property bool loadedUI: false // property to detect if the UI has finished
13
14 onWideAspectChanged: {

Subscribers

People subscribed via source and target branches

to all changes: