Note that this patch will (at present) force meego-ux-daemon to
landscape mode, which probably isn't a good thing. I'm working on
fixing up *its* incorrect idea about orientation now. Patch to follow.

--
Robin Burchell
http://rburchell.com



On Sat, Mar 26, 2011 at 6:32 PM, Robin Burchell <[email protected]> wrote:
> These values were totally different from what meego-qml-launcher uses (as
> determined from the Qt Mobility framework). Qt Mobility gives the correct
> orientation, which is then translated into an orientation passed to QML, but 
> it
> appears the original author of this QML was using a device which had some
> schitzophrenia as to which way was 'up'.
>
> The 'fix' to do portrait/landscape using the incorrect values is not a fix,
> however, because third party applications will still have misleading Qt 
> Mobility
> readings, so either the device needs to somehow alter the readings returned 
> from
> mobility, or the screen display should somehow be rotated.
>
> Signed-off-by: Robin Burchell <[email protected]>
> ---
>  Components/Window.qml |   10 +++++-----
>  1 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/Components/Window.qml b/Components/Window.qml
> index 5c1b932..28b7ff5 100644
> --- a/Components/Window.qml
> +++ b/Components/Window.qml
> @@ -272,7 +272,7 @@ Item {
>
>     // This function returns if the view is in landscape or inverted landscape
>     function isLandscapeView() {
> -        return orientation == 1 || orientation == 3;
> +        return orientation == 0 || orientation == 2;
>     }
>
>     // Clamp val between min and max
> @@ -467,7 +467,7 @@ Item {
>     states: [
>         State {
>             name: "landscape"
> -            when: scene.orientation == 1
> +            when: scene.orientation == 0
>             PropertyChanges {
>                 target: outerContent
>                 width: scene.width
> @@ -482,7 +482,7 @@ Item {
>
>         State {
>             name: "invertedlandscape"
> -            when:scene.orientation == 3
> +            when:scene.orientation == 2
>             PropertyChanges {
>                 target: outerContent
>                 width: scene.width
> @@ -498,7 +498,7 @@ Item {
>
>         State {
>             name: "portrait"
> -            when: scene.orientation == 0
> +            when: scene.orientation == 3
>             PropertyChanges {
>                 target: outerContent
>                 width: scene.height
> @@ -513,7 +513,7 @@ Item {
>
>         State {
>             name: "invertedportrait"
> -            when:scene.orientation == 2
> +            when:scene.orientation == 1
>             PropertyChanges {
>                 target: outerContent
>                 width: scene.height
> --
> 1.7.4.1
>
>
_______________________________________________
MeeGo-dev mailing list
[email protected]
http://lists.meego.com/listinfo/meego-dev
http://wiki.meego.com/Mailing_list_guidelines

Reply via email to