@@ -62,6 +62,22 @@ Item {
62 property int failedLoginsDelayAttempts: 7 // number of failed logins
62 property int failedLoginsDelayAttempts: 7 // number of failed logins
63 property int failedLoginsDelaySeconds: 5 * 60 // seconds of forced waiting
63 property int failedLoginsDelaySeconds: 5 * 60 // seconds of forced waiting
65+ property int orientation
66+ readonly property int deviceOrientationAngle: Screen.angleBetween(Screen.primaryOrientation, Screen.orientation)
67+ onDeviceOrientationAngleChanged: {
68+ if (!OrientationLock.enabled) {
69+ orientation = Screen.orientation;
72+ readonly property bool orientationLockEnabled: OrientationLock.enabled
73+ onOrientationLockEnabledChanged: {
74+ if (orientationLockEnabled) {
75+ OrientationLock.savedOrientation = Screen.orientation;
77+ orientation = Screen.orientation;
65 function activateApplication(appId) {
81 function activateApplication(appId) {
66 if (ApplicationManager.findApplication(appId)) {
82 if (ApplicationManager.findApplication(appId)) {
67 ApplicationManager.requestFocusApplication(appId);
83 ApplicationManager.requestFocusApplication(appId);
@@ -86,6 +102,9 @@ Item {
87 Component.onCompleted: {
103 Component.onCompleted: {
88 Theme.name = "Ubuntu.Components.Themes.SuruGradient"
104 Theme.name = "Ubuntu.Components.Themes.SuruGradient"
105+ if (orientationLockEnabled) {
106+ orientation = OrientationLock.savedOrientation;
91 GSettings {
110 GSettings {
@@ -171,18 +190,6 @@ Item {
174− property int orientation
175− readonly property int deviceOrientation: Screen.angleBetween(Screen.primaryOrientation, Screen.orientation)
176− onDeviceOrientationChanged: {
177− if (!OrientationLock.enabled)
178− orientation = Screen.orientation;
180− readonly property bool orientationLockEnabled: OrientationLock.enabled
181− onOrientationLockEnabledChanged: {
182− if (!OrientationLock.enabled)
183− orientation = Screen.orientation;
187 id: applicationsDisplayLoader
194 id: applicationsDisplayLoader
188 anchors.fill: parent
195 anchors.fill: parent