Advertisement
Guest User

Untitled

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