@@ -36,11 +36,7 @@ import Unity.Notifications 1.0 as NotificationBackend
36FocusScope {
36FocusScope {
39− // this is only here to select the width / height of the window if not running fullscreen
39+ property int orientationAngle
40− property bool tablet: false
41− width: tablet ? units.gu(160) : applicationArguments.hasGeometry() ? applicationArguments.width() : units.gu(40)
42− height: tablet ? units.gu(100) : applicationArguments.hasGeometry() ? applicationArguments.height() : units.gu(71)
44 property real edgeSize: units.gu(2)
40 property real edgeSize: units.gu(2)
45 property url defaultBackground: Qt.resolvedUrl(shell.width >= units.gu(60) ? "graphics/tablet_background.jpg" : "graphics/phone_background.jpg")
41 property url defaultBackground: Qt.resolvedUrl(shell.width >= units.gu(60) ? "graphics/tablet_background.jpg" : "graphics/phone_background.jpg")
46 property url background
42 property url background
@@ -181,11 +177,14 @@ FocusScope {
181 color: "khaki"
177 color: "khaki"
183 x: shown ? launcher.progress : stagesDragArea.progress
179 x: shown ? launcher.progress : stagesDragArea.progress
184− Behavior on x { SmoothedAnimation { velocity: 600; duration: UbuntuAnimation.FastDuration } }
180+ //Behavior on x { SmoothedAnimation { velocity: 600; duration: UbuntuAnimation.FastDuration } }
186 property bool shown: false
182 property bool shown: false
184+ // Avoid a silent "divide by zero -> NaN" situation during init as shell.width will be
185+ // zero. That breaks the property binding and the function won't be reevaluated once
186+ // shell.width is set, with the NaN result staying there for good.
188− property real showProgress: MathUtils.clamp(1 - x / shell.width, 0, 1)
187+ property real showProgress: shell.width ? MathUtils.clamp(1 - x / shell.width, 0, 1) : 0
190 property bool fullyShown: x == 0
189 property bool fullyShown: x == 0
191 property bool fullyHidden: x == width
190 property bool fullyHidden: x == width
@@ -217,6 +216,11 @@ FocusScope {
217 property: "dragAreaWidth"
216 property: "dragAreaWidth"
218 value: shell.edgeSize
217 value: shell.edgeSize
220+ target: applicationsDisplayLoader.item
221+ property: "orientationAngleOfSurfaces"
222+ value: shell.orientationAngle