Guest User

Untitled

a guest
Oct 26th, 2017
150
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. diff -rupN original/usr/share/lipstick-jolla-home-qt5/lockscreen/LockItem.qml patch/usr/share/lipstick-jolla-home-qt5/lockscreen/LockItem.qml
  2. --- original/usr/share/lipstick-jolla-home-qt5/lockscreen/LockItem.qml 2017-08-04 07:34:15.000000000 +0100
  3. +++ patch/usr/share/lipstick-jolla-home-qt5/lockscreen/LockItem.qml 2017-08-04 13:21:37.000000000 +0100
  4. @@ -16,6 +16,7 @@ import org.nemomobile.configuration 1.0
  5. import org.nemomobile.systemsettings 1.0
  6. import "../main"
  7. import "../statusarea"
  8. +import "file:///home/nemo/widgetManager"
  9.  
  10. SilicaFlickable {
  11. id: lockItem
  12. @@ -180,109 +181,22 @@ SilicaFlickable {
  13. width: lockItem.width
  14. height: lockItem.height - y
  15.  
  16. - Clock {
  17. + Item
  18. + {
  19. id: clock
  20. + property real transitionOpacity: 1.0
  21. + property real unlockOpacity: lockScreen.locked ? 1 - lockScreen.progress : 0.0
  22. + opacity: Math.min(transitionOpacity, unlockOpacity)
  23. + }
  24. +
  25. + PortraitWidgets {
  26. + anchors.fill:parent
  27. + visible: lockScreenPage.isPortrait
  28. + }
  29.  
  30. - property bool cannotCenter: Screen.sizeCategory <= Screen.Medium && lockScreenPage.isPortrait
  31. -
  32. - property real peekOffset: clock.followPeekPosition
  33. - ? lockScreen.progress * (lockItem.contentTopMargin - lockItem.statusBarHeight)
  34. - : 0
  35. - property real animationOffset
  36. - readonly property real offset: Math.max(peekOffset, animationOffset)
  37. - property real transitionOpacity: 1.0
  38. - property real unlockOpacity: lockScreen.locked ? 1 - lockScreen.progress : 0.0
  39. -
  40. - property string positionState: {
  41. - if (lockScreen.lowPowerMode) {
  42. - return "fixed-center"
  43. - } else if (Lipstick.compositor.lockScreenLayer.closing) {
  44. - return "raised"
  45. - } else if (!lockScreen.locked && !visible && !Lipstick.compositor.cameraLayer.exposed) {
  46. - return "fixed-raised"
  47. - } else if (!lockItem.allowAnimations) {
  48. - return lockScreen.lockScreenAnimated ? "raised" : "fixed-center"
  49. - } else if (lockScreen.panning) {
  50. - return "panning"
  51. - } else if ((!lockScreen.locked && !Lipstick.compositor.cameraLayer.exposed)
  52. - || Lipstick.compositor.notificationOverviewLayer.revealingEventsView) {
  53. - return "raised"
  54. - } else {
  55. - return "center"
  56. - }
  57. - }
  58. -
  59. - onPositionStateChanged: {
  60. - if (positionState == "fixed-raised") {
  61. - offsetAnimation.stop()
  62. - animationOffset = lockScreen.peekFilter.threshold * 0.5
  63. - opacityAnimation.stop()
  64. - transitionOpacity = 0
  65. - } else if (positionState == "fixed-center") {
  66. - offsetAnimation.stop()
  67. - animationOffset = 0
  68. - opacityAnimation.stop()
  69. - transitionOpacity = 1
  70. - } else if (positionState == "raised") {
  71. - offsetAnimation.from = offset
  72. - offsetAnimation.to = lockScreen.peekFilter.threshold * 0.5
  73. - offsetAnimation.duration = 400
  74. - offsetAnimation.restart()
  75. - opacityAnimation.duration = 400
  76. - opacityAnimation.to = 0
  77. - opacityAnimation.restart()
  78. - } else {
  79. - offsetAnimation.from = offset
  80. - offsetAnimation.to = 0
  81. - offsetAnimation.duration = 500
  82. - offsetAnimation.restart()
  83. - opacityAnimation.duration = 500
  84. - opacityAnimation.to = 1
  85. - opacityAnimation.restart()
  86. - }
  87. - }
  88. -
  89. - FadeAnimation {
  90. - id: opacityAnimation
  91. - target: clock
  92. - property: "transitionOpacity"
  93. - }
  94. -
  95. - NumberAnimation on animationOffset {
  96. - id: offsetAnimation
  97. - running: false
  98. - easing.type: Easing.InOutQuad
  99. - }
  100. -
  101. - anchors {
  102. - horizontalCenter: parent.horizontalCenter
  103. - topMargin: cannotCenter ? Theme.paddingLarge - offset : 0
  104. - verticalCenterOffset: !cannotCenter ? -offset : 0
  105. - }
  106. -
  107. - color: lockScreen.textColor
  108. - updatesEnabled: visible
  109. - opacity: Math.min(transitionOpacity, unlockOpacity)
  110. - Behavior on unlockOpacity {
  111. - enabled: lockScreen.locked
  112. - SmoothedAnimation { duration: 100; velocity: 1000 / duration }
  113. - }
  114. -
  115. - states: [
  116. - State {
  117. - when: clock.cannotCenter
  118. - AnchorChanges {
  119. - target: clock
  120. - anchors { top: contentItem.top; verticalCenter: undefined }
  121. - }
  122. - }, State {
  123. - when: !clock.cannotCenter
  124. - AnchorChanges {
  125. - target: clock
  126. - anchors { top: undefined; verticalCenter: contentItem.verticalCenter }
  127. - }
  128. - }
  129. - ]
  130. + LandscapeWidgets {
  131. + anchors.fill:parent
  132. + visible: !lockScreenPage.isPortrait
  133. }
  134.  
  135. MprisPlayerControls {
  136. diff -rupN original/usr/share/lipstick-jolla-home-qt5/lockscreen/LockScreen.qml patch/usr/share/lipstick-jolla-home-qt5/lockscreen/LockScreen.qml
  137. --- original/usr/share/lipstick-jolla-home-qt5/lockscreen/LockScreen.qml 2017-08-04 07:34:15.000000000 +0100
  138. +++ patch/usr/share/lipstick-jolla-home-qt5/lockscreen/LockScreen.qml 2017-08-31 18:30:52.000000000 +0100
  139. @@ -25,12 +25,35 @@ ApplicationWindow {
  140.  
  141. cover: undefined
  142. _clippingItem.opacity: 1.0
  143. - allowedOrientations: Lipstick.compositor.homeOrientation
  144. -
  145. +// allowedOrientations: Lipstick.compositor.homeOrientation
  146. initialPage: Component {
  147. Page {
  148. id: lockScreenPage
  149. - allowedOrientations: Orientation.All
  150. + ConfigurationGroup {
  151. + id: widgetSettings
  152. + path: "/desktop/lipstick-jolla-home/widgetManager"
  153. + property bool rotateLockscreen: true
  154. + property bool rotateLpmscreen: true
  155. + property bool lockscreenAllOrientations: true
  156. + property bool lpmscreenAllOrientations: true
  157. + }
  158. + //allowedOrientations: Orientation.All
  159. + allowedOrientations: {
  160. + if(lockScreen.lowPowerMode){
  161. + if( widgetSettings.rotateLpmscreen) {
  162. + if(widgetSettings.lpmscreenAllOrientations ) return Orientation.All
  163. + else return defaultAllowedOrientations
  164. + }
  165. + else return Orientation.Portrait
  166. + }
  167. + else {
  168. + if( widgetSettings.rotateLockscreen) {
  169. + if(widgetSettings.lockscreenAllOrientations ) return Orientation.All
  170. + else return defaultAllowedOrientations
  171. + }
  172. + else return Orientation.Portrait
  173. + }
  174. + }
  175. property bool displayOnFromLowPowerMode
  176.  
  177. Latch {
  178. @@ -548,7 +571,7 @@ ApplicationWindow {
  179. visible: systemStarted.value
  180. allowAnimations: vignette.opened
  181. iconSuffix: lockScreen.iconSuffix
  182. - clock.followPeekPosition: !parent.rightItem
  183. + //clock.followPeekPosition: !parent.rightItem
  184.  
  185. Binding { target: lockItem.mpris.item; property: "enabled"; value: !lockScreen.lowPowerMode }
  186. }
  187. diff -rupN original/usr/share/lipstick-jolla-home-qt5/main.qml patch/usr/share/lipstick-jolla-home-qt5/main.qml
  188. --- original/usr/share/lipstick-jolla-home-qt5/main.qml 2017-08-04 07:31:34.000000000 +0100
  189. +++ patch/usr/share/lipstick-jolla-home-qt5/main.qml 2017-08-29 17:21:36.000000000 +0100
  190. @@ -1,4 +1,4 @@
  191. -/****************************************************************************
  192. +/****************************************************************************
  193. **
  194. ** Copyright (C) 2013 Jolla Ltd.
  195. ** Contact: Petri M. Gerdt <petri.gerdt@jollamobile.com>
  196. @@ -24,12 +24,14 @@ ApplicationWindow {
  197. function desktopInstance() {
  198. return Desktop.instance
  199. }
  200. -
  201. + ConfigurationGroup {
  202. + id: widgetManager
  203. + path: "/desktop/lipstick-jolla-home/widgetManager"
  204. + property bool rotateHomescreen: true
  205. + property bool homescreenAllOrientations: true
  206. + }
  207. allowedOrientations: {
  208. - var allowedOrientations = Screen.sizeCategory > Screen.Medium
  209. - ? defaultAllowedOrientations
  210. - : defaultAllowedOrientations & Orientation.PortraitMask
  211. -
  212. + var allowedOrientations = widgetManager.rotateHomescreen ? (widgetManager.homescreenAllOrientations ? Orientation.All: defaultAllowedOrientations) : defaultAllowedOrientations & Orientation.PortraitMask
  213. if (Lipstick.compositor.alarmLayer.window
  214. && (Lipstick.compositor.alarmLayer.window.orientation & allowedOrientations)) {
  215. return Lipstick.compositor.alarmLayer.window.orientation
RAW Paste Data