on xenial help sign in
Remove orientation-support code from Shell.qml. Shimmy things around to reduce delta
4aa5c3bGerry Boland
qml/Shell.qml+5−25
@@ -37,37 +37,17 @@ import Unity.Session 0.1
37FocusScope {
37FocusScope {
38 id: shell
38 id: shell
39
39
40− property int supportedScreenOrientations: {
40+ // this is only here to select the width / height of the window if not running fullscreen
41− // check device name and fix orientation if necessary
41+ property bool tablet: false
42− var deviceOrientations;
42+ width: tablet ? units.gu(160) : applicationArguments.hasGeometry() ? applicationArguments.width() : units.gu(40)
43− if (applicationArguments.device() === "flo") {
43+ height: tablet ? units.gu(100) : applicationArguments.hasGeometry() ? applicationArguments.height() : units.gu(71)
44− deviceOrientations = Qt.InvertedLandscapeOrientation;
45− } else if (applicationArguments.device() === "manta") {
46− deviceOrientations = Qt.LandscapeOrientation;
47− } else if (applicationArguments.device() === "mako") {
48− deviceOrientations = Qt.PortraitOrientation
49− | Qt.InvertedPortraitOrientation
50− | Qt.LandscapeOrientation
51− | Qt.InvertedLandscapeOrientation;
52− }
53−
54− if (stages.shown && ApplicationManager.topmostApplication) {
55− return deviceOrientations & ApplicationManager.topmostApplication.supportedOrientations;
56− } else {
57− return deviceOrientations;
58− }
59− }
60− property bool dashShown: dash.shown && dash.available && underlay.visible
61
44
62 property real edgeSize: units.gu(2)
45 property real edgeSize: units.gu(2)
63 property url defaultBackground: Qt.resolvedUrl(shell.width >= units.gu(60) ? "graphics/tablet_background.jpg" : "graphics/phone_background.jpg")
46 property url defaultBackground: Qt.resolvedUrl(shell.width >= units.gu(60) ? "graphics/tablet_background.jpg" : "graphics/phone_background.jpg")
64 property url background
47 property url background
65 readonly property real panelHeight: panel.panelHeight
48 readonly property real panelHeight: panel.panelHeight
66
49
67− // this is only here to select the width / height of the window if not running fullscreen
50+ property bool dashShown: dash.shown && dash.available && underlay.visible
68− property bool tablet: false
69− width: tablet ? units.gu(160) : applicationArguments.hasGeometry() ? applicationArguments.width() : units.gu(40)
70− height: tablet ? units.gu(100) : applicationArguments.hasGeometry() ? applicationArguments.height() : units.gu(71)
71
51
72 property bool sideStageEnabled: shell.width >= units.gu(100)
52 property bool sideStageEnabled: shell.width >= units.gu(100)
73
53