Advertisement
Guest User

Untitled

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