on xenial help sign in
Privative Orientations object
4dd50c7Josh Arenson
qml/OrientedShell.qml+16−14
@@ -37,24 +37,26 @@ Rectangle {
37 name: applicationArguments.deviceName
37 name: applicationArguments.deviceName
38 }
38 }
39
39
40− property alias orientations: orientations_
40+ property alias orientations: d.orientations
41− Orientations {
42− id: orientations_
43− // NB: native and primary orientations here don't map exactly to their QScreen counterparts
44− native_: root.width > root.height ? Qt.LandscapeOrientation : Qt.PortraitOrientation
45
41
46− primary: deviceConfiguration.primaryOrientation == deviceConfiguration.useNativeOrientation
42+ Item {
47− ? native_ : deviceConfiguration.primaryOrientation
43+ id: d
48−
49− landscape: deviceConfiguration.landscapeOrientation
50− invertedLandscape: deviceConfiguration.invertedLandscapeOrientation
51− portrait: deviceConfiguration.portraitOrientation
52− invertedPortrait: deviceConfiguration.invertedPortraitOrientation
53− }
54
44
45+ property Orientations orientations: Orientations {
46+ id: orientations
47+ // NB: native and primary orientations here don't map exactly to their QScreen counterparts
48+ native_: root.width > root.height ? Qt.LandscapeOrientation : Qt.PortraitOrientation
55
49
50+ primary: deviceConfiguration.primaryOrientation == deviceConfiguration.useNativeOrientation
51+ ? native_ : deviceConfiguration.primaryOrientation
56
52
53+ landscape: deviceConfiguration.landscapeOrientation
54+ invertedLandscape: deviceConfiguration.invertedLandscapeOrientation
55+ portrait: deviceConfiguration.portraitOrientation
56+ invertedPortrait: deviceConfiguration.invertedPortraitOrientation
57+ }
58+ }
57− // to be overwritten by tests
59+ // to be overwritten by tests
58 property var unity8Settings: Unity8Settings {}
60 property var unity8Settings: Unity8Settings {}
59 property var oskSettings: GSettings { schema.id: "com.canonical.keyboard.maliit" }
61 property var oskSettings: GSettings { schema.id: "com.canonical.keyboard.maliit" }
60
62