on xenial help sign in
fix camera orientation
d67efa6Michael Zanetti
qml/Stage/DecoratedWindow.qml+3−4
@@ -26,8 +26,8 @@ FocusScope {
26 // (minus the window decoration size in case hasDecoration and showDecoration are true)
26 // (minus the window decoration size in case hasDecoration and showDecoration are true)
27 // The surface might not be able to resize to the requested values. It will return its actual size
27 // The surface might not be able to resize to the requested values. It will return its actual size
28 // in implicitWidth/implicitHeight.
28 // in implicitWidth/implicitHeight.
29− implicitWidth: !counterRotate ? applicationWindow.implicitWidth : applicationWindow.implicitHeight
29+ implicitWidth: applicationWindow.implicitWidth
30− implicitHeight: decorationHeight + (!counterRotate ? applicationWindow.implicitHeight : applicationWindow.implicitWidth)
30+ implicitHeight: decorationHeight + applicationWindow.implicitHeight
31
31
32 property alias application: applicationWindow.application
32 property alias application: applicationWindow.application
33 property alias surface: applicationWindow.surface
33 property alias surface: applicationWindow.surface
@@ -160,6 +160,7 @@ FocusScope {
160
160
161 transform: [
161 transform: [
162 Rotation {
162 Rotation {
163+ id: rotationTransform
163 readonly property int rotationAngle: applicationWindow.application &&
164 readonly property int rotationAngle: applicationWindow.application &&
164 applicationWindow.application.rotatesWindowContents
165 applicationWindow.application.rotatesWindowContents
165 ? ((360 - applicationWindow.surfaceOrientationAngle) % 360) : 0
166 ? ((360 - applicationWindow.surfaceOrientationAngle) % 360) : 0
@@ -184,6 +185,4 @@ FocusScope {
184
185
185 ]
186 ]
186 }
187 }
187−
188−// Rectangle { anchors.fill: parent; color: "blue"; opacity: .3 }
189}
188}
tests/qmltests/tst_OrientedShell.qml+1−1
@@ -28,7 +28,7 @@ import Unity.InputInfo 0.1
28import Utils 0.1
28import Utils 0.1
29
29
30import "../../qml"
30import "../../qml"
31−import "Stages"
31+import "Stage"
32
32
33Rectangle {
33Rectangle {
34 id: root
34 id: root