on xenial help sign in
Privative Orientations object
commit4dd50c785caf55e6620c988fcb88a18b43e49781 authorJosh Arenson <joshua.arenson@canonical.com> dateFri 25 Sep 2015, 11:23 (11 years ago) parent12ab1f6
1 file changed+16−14
qml/OrientedShell.qml+16−14
qml/OrientedShell.qml+16−14
@@ -37,24 +37,26 @@ Rectangle {
3737 name: applicationArguments.deviceName
3838 }
3939
40− property alias orientations: 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
40+ property alias orientations: d.orientations
4541
46− primary: deviceConfiguration.primaryOrientation == deviceConfiguration.useNativeOrientation
47− ? native_ : deviceConfiguration.primaryOrientation
48−
49− landscape: deviceConfiguration.landscapeOrientation
50− invertedLandscape: deviceConfiguration.invertedLandscapeOrientation
51− portrait: deviceConfiguration.portraitOrientation
52− invertedPortrait: deviceConfiguration.invertedPortraitOrientation
53− }
42+ Item {
43+ id: d
5444
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
5549
50+ primary: deviceConfiguration.primaryOrientation == deviceConfiguration.useNativeOrientation
51+ ? native_ : deviceConfiguration.primaryOrientation
5652
57− // to be overwritten by tests
53+ landscape: deviceConfiguration.landscapeOrientation
54+ invertedLandscape: deviceConfiguration.invertedLandscapeOrientation
55+ portrait: deviceConfiguration.portraitOrientation
56+ invertedPortrait: deviceConfiguration.invertedPortraitOrientation
57+ }
58+ }
59+ // to be overwritten by tests
5860 property var unity8Settings: Unity8Settings {}
5961 property var oskSettings: GSettings { schema.id: "com.canonical.keyboard.maliit" }
6062