Rotate device 90/180 degrees to the right, Scan code view is inverted

Bug #1484445 reported by Evan Wang
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Tagger
Fix Released
Undecided
Unassigned
qtubuntu (Ubuntu)
New
High
Unassigned

Bug Description

$ system-image-cli -i
current build number: 96
device name: krillin
channel: ubuntu-touch/rc-proposed/bq-aquaris.en
last update: 2015-08-13 12:29:02
version version: 96
version ubuntu: 20150813
version device: 20150804-7bba081
version custom: 20150717-820-30-25-vivid

Steps to reproduce:
1. Launch Tagger app from Apps scope
2. Rotate device 90/180 degrees to the right, Scan code view is inverted

Revision history for this message
Michael Zanetti (mzanetti) wrote :

QtUbuntu currently only gives Qt.Portrait and Qt.Landscape to the application. In order to know how to adjust the camera view, support for Qt.InvertedPortrait and Qt.InvertedLandscape would be required.

Changed in tagger:
status: New → Confirmed
Revision history for this message
Michael Zanetti (mzanetti) wrote :

I've committed the code that would fix this issue in Tagger if QtUbuntu would give the proper information about InvertedLandscape. Closing for Tagger. Leaving open for QtUbuntu.

Changed in tagger:
status: Confirmed → Fix Committed
status: Fix Committed → Fix Released
Changed in qtubuntu:
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Gerry Boland (gerboland) wrote :

IMO As Tagger uses the camera, it doesn't make sense for it to ever rotate the camera viewport. Reason is that say you hold your phone at 45 degrees, the UI will perform the rotation animation, which will confuse the user.

Then the app dev to know the actual device orientation, to undo the shell's rotation.

We think a better solution is for the app to not be rotated by the shell at all, but be notified of the device orientation so it can adjust its UI to suit. The Camera app does this currently.

Place "X-Ubuntu-Rotates-Window-Contents=true" in the desktop file. Then the app surface is never rotated, and Screen.orientation will reflect the actual device orientation (i.e. includes Qt.InvertedPortrait and Qt.InvertedLandscape), which you can use to rotate the UI to suit.

Note if the window is not fullscreen, the panel will move on device rotation, meaning your window will be resized a bit. But never rotated

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

The rationale being that the camera viewport, as it displays a live feed of the physical camera, should always be at the device's native orientation, like the camera itself. And the easiest way to achieve that is to simply not rotate the viewport in the first place.

SDK still has the OrientationHelper for apps that do their own rotation.

Changed in qtubuntu:
status: Confirmed → Invalid
Revision history for this message
Michael Zanetti (mzanetti) wrote :

"We think a better solution is for the app to not be rotated by the shell at all, but be notified of the device orientation so it can adjust its UI to suit. The Camera app does this currently."

No... I disagree. First, I'm not talking about tagger only. There's many use cases where an app might have a camera viewport somewher in it, even without camera being the primary use case. We can't ask all those apps to copletely take care about rotation themselves.

Changed in qtubuntu:
status: Invalid → New
Michał Sawicz (saviq)
affects: qtubuntu → qtubuntu (Ubuntu)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.