Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -rupN original/usr/share/lipstick-jolla-home-qt5/lockscreen/LockItem.qml patch/usr/share/lipstick-jolla-home-qt5/lockscreen/LockItem.qml
- --- original/usr/share/lipstick-jolla-home-qt5/lockscreen/LockItem.qml 2017-08-04 07:34:15.000000000 +0100
- +++ patch/usr/share/lipstick-jolla-home-qt5/lockscreen/LockItem.qml 2017-08-04 13:21:37.000000000 +0100
- @@ -16,6 +16,7 @@ import org.nemomobile.configuration 1.0
- import org.nemomobile.systemsettings 1.0
- import "../main"
- import "../statusarea"
- +import "file:///home/nemo/widgetManager"
- SilicaFlickable {
- id: lockItem
- @@ -180,109 +181,20 @@ SilicaFlickable {
- width: lockItem.width
- height: lockItem.height - y
- - Clock {
- + Item
- + {
- id: clock
- + opacity: 1.0
- + }
- +
- + PortraitWidgets {
- + anchors.fill:parent
- + visible: lockScreenPage.isPortrait
- + }
- - property bool cannotCenter: Screen.sizeCategory <= Screen.Medium && lockScreenPage.isPortrait
- -
- - property real peekOffset: clock.followPeekPosition
- - ? lockScreen.progress * (lockItem.contentTopMargin - lockItem.statusBarHeight)
- - : 0
- - property real animationOffset
- - readonly property real offset: Math.max(peekOffset, animationOffset)
- - property real transitionOpacity: 1.0
- - property real unlockOpacity: lockScreen.locked ? 1 - lockScreen.progress : 0.0
- -
- - property string positionState: {
- - if (lockScreen.lowPowerMode) {
- - return "fixed-center"
- - } else if (Lipstick.compositor.lockScreenLayer.closing) {
- - return "raised"
- - } else if (!lockScreen.locked && !visible && !Lipstick.compositor.cameraLayer.exposed) {
- - return "fixed-raised"
- - } else if (!lockItem.allowAnimations) {
- - return lockScreen.lockScreenAnimated ? "raised" : "fixed-center"
- - } else if (lockScreen.panning) {
- - return "panning"
- - } else if ((!lockScreen.locked && !Lipstick.compositor.cameraLayer.exposed)
- - || Lipstick.compositor.notificationOverviewLayer.revealingEventsView) {
- - return "raised"
- - } else {
- - return "center"
- - }
- - }
- -
- - onPositionStateChanged: {
- - if (positionState == "fixed-raised") {
- - offsetAnimation.stop()
- - animationOffset = lockScreen.peekFilter.threshold * 0.5
- - opacityAnimation.stop()
- - transitionOpacity = 0
- - } else if (positionState == "fixed-center") {
- - offsetAnimation.stop()
- - animationOffset = 0
- - opacityAnimation.stop()
- - transitionOpacity = 1
- - } else if (positionState == "raised") {
- - offsetAnimation.from = offset
- - offsetAnimation.to = lockScreen.peekFilter.threshold * 0.5
- - offsetAnimation.duration = 400
- - offsetAnimation.restart()
- - opacityAnimation.duration = 400
- - opacityAnimation.to = 0
- - opacityAnimation.restart()
- - } else {
- - offsetAnimation.from = offset
- - offsetAnimation.to = 0
- - offsetAnimation.duration = 500
- - offsetAnimation.restart()
- - opacityAnimation.duration = 500
- - opacityAnimation.to = 1
- - opacityAnimation.restart()
- - }
- - }
- -
- - FadeAnimation {
- - id: opacityAnimation
- - target: clock
- - property: "transitionOpacity"
- - }
- -
- - NumberAnimation on animationOffset {
- - id: offsetAnimation
- - running: false
- - easing.type: Easing.InOutQuad
- - }
- -
- - anchors {
- - horizontalCenter: parent.horizontalCenter
- - topMargin: cannotCenter ? Theme.paddingLarge - offset : 0
- - verticalCenterOffset: !cannotCenter ? -offset : 0
- - }
- -
- - color: lockScreen.textColor
- - updatesEnabled: visible
- - opacity: Math.min(transitionOpacity, unlockOpacity)
- - Behavior on unlockOpacity {
- - enabled: lockScreen.locked
- - SmoothedAnimation { duration: 100; velocity: 1000 / duration }
- - }
- -
- - states: [
- - State {
- - when: clock.cannotCenter
- - AnchorChanges {
- - target: clock
- - anchors { top: contentItem.top; verticalCenter: undefined }
- - }
- - }, State {
- - when: !clock.cannotCenter
- - AnchorChanges {
- - target: clock
- - anchors { top: undefined; verticalCenter: contentItem.verticalCenter }
- - }
- - }
- - ]
- + LandscapeWidgets {
- + anchors.fill:parent
- + visible: !lockScreenPage.isPortrait
- }
- MprisPlayerControls {
- diff -rupN original/usr/share/lipstick-jolla-home-qt5/lockscreen/LockScreen.qml patch/usr/share/lipstick-jolla-home-qt5/lockscreen/LockScreen.qml
- --- original/usr/share/lipstick-jolla-home-qt5/lockscreen/LockScreen.qml 2017-08-04 07:34:15.000000000 +0100
- +++ patch/usr/share/lipstick-jolla-home-qt5/lockscreen/LockScreen.qml 2017-08-31 18:30:52.000000000 +0100
- @@ -25,12 +25,35 @@ ApplicationWindow {
- cover: undefined
- _clippingItem.opacity: 1.0
- - allowedOrientations: Lipstick.compositor.homeOrientation
- -
- +// allowedOrientations: Lipstick.compositor.homeOrientation
- initialPage: Component {
- Page {
- id: lockScreenPage
- - allowedOrientations: Orientation.All
- + ConfigurationGroup {
- + id: widgetSettings
- + path: "/desktop/lipstick-jolla-home/widgetManager"
- + property bool rotateLockscreen: true
- + property bool rotateLpmscreen: true
- + property bool lockscreenAllOrientations: true
- + property bool lpmscreenAllOrientations: true
- + }
- + //allowedOrientations: Orientation.All
- + allowedOrientations: {
- + if(lockScreen.lowPowerMode){
- + if( widgetSettings.rotateLpmscreen) {
- + if(widgetSettings.lpmscreenAllOrientations ) return Orientation.All
- + else return defaultAllowedOrientations
- + }
- + else return Orientation.Portrait
- + }
- + else {
- + if( widgetSettings.rotateLockscreen) {
- + if(widgetSettings.lockscreenAllOrientations ) return Orientation.All
- + else return defaultAllowedOrientations
- + }
- + else return Orientation.Portrait
- + }
- + }
- property bool displayOnFromLowPowerMode
- Latch {
- @@ -548,7 +571,7 @@ ApplicationWindow {
- visible: systemStarted.value
- allowAnimations: vignette.opened
- iconSuffix: lockScreen.iconSuffix
- - clock.followPeekPosition: !parent.rightItem
- + //clock.followPeekPosition: !parent.rightItem
- Binding { target: lockItem.mpris.item; property: "enabled"; value: !lockScreen.lowPowerMode }
- }
- diff -rupN original/usr/share/lipstick-jolla-home-qt5/main.qml patch/usr/share/lipstick-jolla-home-qt5/main.qml
- --- original/usr/share/lipstick-jolla-home-qt5/main.qml 2017-08-04 07:31:34.000000000 +0100
- +++ patch/usr/share/lipstick-jolla-home-qt5/main.qml 2017-08-29 17:21:36.000000000 +0100
- @@ -1,4 +1,4 @@
- -/****************************************************************************
- +/****************************************************************************
- **
- ** Copyright (C) 2013 Jolla Ltd.
- ** Contact: Petri M. Gerdt <petri.gerdt@jollamobile.com>
- @@ -24,12 +24,14 @@ ApplicationWindow {
- function desktopInstance() {
- return Desktop.instance
- }
- -
- + ConfigurationGroup {
- + id: widgetManager
- + path: "/desktop/lipstick-jolla-home/widgetManager"
- + property bool rotateHomescreen: true
- + property bool homescreenAllOrientations: true
- + }
- allowedOrientations: {
- - var allowedOrientations = Screen.sizeCategory > Screen.Medium
- - ? defaultAllowedOrientations
- - : defaultAllowedOrientations & Orientation.PortraitMask
- -
- + var allowedOrientations = widgetManager.rotateHomescreen ? (widgetManager.homescreenAllOrientations ? Orientation.All: defaultAllowedOrientations) : defaultAllowedOrientations & Orientation.PortraitMask
- if (Lipstick.compositor.alarmLayer.window
- && (Lipstick.compositor.alarmLayer.window.orientation & allowedOrientations)) {
- return Lipstick.compositor.alarmLayer.window.orientation
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement