← Back to team overview

ubuntu-phone team mailing list archive

Re: [design] rotation

 

On 25/02/13 13:01, Alan Bell wrote:
> At the moment the devices don't support rotation. I don't think
> rotation is the same thing as a window changing size and aspect ratio,
> I think there is a bit more to it than that. Some applications will
> want to be portrait only, some will want to be landscape only. Some
> may want to display a different UI in each orientation (like a
> calculator being 4 function in portrait and scientific in landscape).
> If there are multiple applications in the switcher list dragging from
> the right will drag across some in portrait and some in landscape, so
> you will have both on screen at the same time, at least partially. Do
> applications get their coordinate space remapped externally, so
> internally to the application it always thinks "up" is the same
> direction, or do applications get told to rotate themselves and have
> to figure out if they rotate by 90 or 270 degrees? What happens if you
> continuously slowly rotate the device, does it continue to rotate or
> jump backwards when you go past 360 degrees? Is there animation
> effects for the transition between orientation states? Are we going to
> support the mozilla html5 api extensions for orientation?
>
> https://wiki.mozilla.org/B2G/QA/WebAPI_Test_Plan/Screen_Orientation

Using QML, we need to expose QScreen's orientation() method and
orientationChanged signal [1]. Note that there is also the concept of
content orientation in QWindow [2] which may or may not be useful. I
suspect Qt::QScreenOrientation is an enum that should have a simple
mapping to the Mozilla mozOrientation so supporting that API extension
sounds reasonable.

>
> What happens when an application that wants to always be portrait ends
> up on a TV?

Side-stage it?

Bruno

[1] http://qt-project.org/doc/qt-5.0/qtgui/qscreen.html
[2] http://qt-project.org/doc/qt-5.0/qtgui/qwindow.html


Follow ups

References