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-04-25 14:55:01.000000000 +0100
- +++ patch/usr/share/lipstick-jolla-home-qt5/lockscreen/LockItem.qml 2017-04-26 09:47:40.000000000 +0100
- @@ -16,12 +16,13 @@ import org.nemomobile.configuration 1.0
- import org.nemomobile.systemsettings 1.0
- import "../main"
- import "../statusarea"
- +import "file:///home/nemo/widgetManager"
- SilicaFlickable {
- id: lockItem
- readonly property alias indicatorSize: rightIndicator.width
- property bool allowAnimations
- - property alias clock: clock
- + //property alias clock: clock
- property alias mpris: mpris
- property alias leftIndicator: leftIndicator
- property alias rightIndicator: rightIndicator
- @@ -236,7 +237,7 @@ SilicaFlickable {
- mpris.item.anchors.horizontalCenter = Qt.binding(function () { return parent.horizontalCenter })
- mpris.item.anchors.bottom = Qt.binding(function () { return ongoingCall.top })
- mpris.item.anchors.bottomMargin = Theme.paddingMedium
- - mpris.item.opacity = Qt.binding(function() { return mpris.item && mpris.item.enabled ? clock.opacity : 0.0 })
- + mpris.item.opacity = Qt.binding(function() { return mpris.item && mpris.item.enabled ? 1.0 : 0.0 })
- mpris.item.buttonSize = Screen.sizeCategory > Screen.Medium ? Theme.iconSizeExtraLarge : Theme.iconSizeLarge
- }
- @@ -260,107 +261,20 @@ SilicaFlickable {
- }
- }
- - Clock {
- - id: clock
- -
- - property bool cannotCenter: Screen.sizeCategory <= Screen.Medium && lockScreenPage.isPortrait
- -
- - property real peekOffset: clock.followPeekPosition
- - ? lockScreen.progress * lockScreen.peekFilter.threshold * 0.25
- - : 0
- - property real animationOffset
- - readonly property real offset: Math.max(peekOffset, animationOffset)
- -
- - property string positionState: {
- - if (lockScreen.lowPowerMode) {
- - return "fixed-center"
- - } else if (Lipstick.compositor.lockScreenLayer.closing) {
- - return "raised"
- - } else if (!lockScreen.locked && !visible) {
- - 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.notificationOverviewLayer.revealingEventsView) {
- - return "raised"
- - } else {
- - return "center"
- - }
- - }
- -
- - onPositionStateChanged: {
- - if (positionState == "fixed-raised") {
- - offsetAnimation.stop()
- - animationOffset = lockScreen.peekFilter.threshold * 0.5
- - opacityAnimation.stop()
- - opacity = 0
- - } else if (positionState == "fixed-center") {
- - offsetAnimation.stop()
- - animationOffset = 0
- - opacityAnimation.stop()
- - opacity = 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
- - }
- -
- - 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
- -
- - 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 }
- - }
- - }
- - ]
- + PortraitWidgets {
- + anchors.fill:parent
- + visible: lockScreenPage.isPortrait
- }
- + LandscapeWidgets {
- + anchors.fill:parent
- + visible: !lockScreenPage.isPortrait
- + }
- +
- OngoingCall {
- id: ongoingCall
- - opacity: clock.opacity
- - visible: clock.visible
- + opacity: 1.0
- + //visible: clock.visible
- anchors {
- bottom: cellularNetworkName.active ? cellularNetworkName.top : parent.bottom
- bottomMargin: cellularNetworkName.active ? Theme.paddingMedium : Theme.itemSizeExtraSmall
- @@ -370,8 +284,8 @@ SilicaFlickable {
- Loader {
- id: cellularNetworkName
- active: Telephony.multiSimSupported
- - opacity: clock.opacity
- - visible: clock.visible && !lipstickSettings.lowPowerMode
- + opacity: 1.0
- + //visible: clock.visible && !lipstickSettings.lowPowerMode
- anchors {
- bottom: parent.bottom
- bottomMargin: Theme.paddingSmall
- 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-04-25 14:55:26.000000000 +0100
- +++ patch/usr/share/lipstick-jolla-home-qt5/lockscreen/LockScreen.qml 2017-04-26 08:18:48.000000000 +0100
- @@ -24,10 +24,17 @@ ApplicationWindow {
- cover: undefined
- _clippingItem.opacity: 1.0
- - allowedOrientations: Lipstick.compositor.homeOrientation
- + //allowedOrientations: Lipstick.compositor.homeOrientation
- initialPage: Component {
- Page {
- +
- + ConfigurationGroup {
- + id: widgetSettings
- + path: "/desktop/lipstick-jolla-home/widgetManager"
- + property bool rotateLockscreen: true
- + }
- +
- id: lockScreenPage
- - allowedOrientations: Orientation.All
- + allowedOrientations: widgetSettings.rotateLockscreen && !lockScreen.lowPowerMode ? defaultAllowedOrientations : Orientation.Portrait
- property bool displayOnFromLowPowerMode
- @@ -172,8 +180,8 @@ ApplicationWindow {
- updatesEnabled: lockScreen.locked
- color: lockScreen.textColor
- opacity: systemStarted.value && vignette.opened
- - ? (deviceLockContainer.isCurrentItem ? deviceLockItem.opacity : lockItem.clock.opacity)
- - : 0.0
- + ? (deviceLockContainer.isCurrentItem ? deviceLockItem.opacity : 1.0)
- + : 1.0
- z: 1
- }
- @@ -471,7 +479,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-04-25 14:54:02.000000000 +0100
- +++ patch/usr/share/lipstick-jolla-home-qt5/main.qml 2017-04-25 15:02:13.000000000 +0100
- @@ -1,4 +1,4 @@
- -/****************************************************************************
- +/****************************************************************************
- **
- ** Copyright (C) 2013 Jolla Ltd.
- ** Contact: Petri M. Gerdt <petri.gerdt@jollamobile.com>
- @@ -24,11 +24,15 @@ ApplicationWindow {
- function desktopInstance() {
- return Desktop.instance
- }
- + ConfigurationGroup {
- + id: widgetManager
- + path: "/desktop/lipstick-jolla-home/widgetManager"
- + property bool rotateHomescreen: true
- + }
- +
- allowedOrientations: {
- - var allowedOrientations = Screen.sizeCategory > Screen.Medium
- - ? defaultAllowedOrientations
- - : defaultAllowedOrientations & Orientation.PortraitMask
- + var allowedOrientations = widgetManager.rotateHomescreen ? defaultAllowedOrientations : defaultAllowedOrientations & Orientation.PortraitMask
- if (Lipstick.compositor.alarmLayer.window
- && (Lipstick.compositor.alarmLayer.window.orientation & allowedOrientations)) {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement