diff options
Diffstat (limited to 'modules/lock/LockSurface.qml')
| -rw-r--r-- | modules/lock/LockSurface.qml | 71 |
1 files changed, 38 insertions, 33 deletions
diff --git a/modules/lock/LockSurface.qml b/modules/lock/LockSurface.qml index 084c275..6c2ffa7 100644 --- a/modules/lock/LockSurface.qml +++ b/modules/lock/LockSurface.qml @@ -90,8 +90,6 @@ WlSessionLockSurface { anchors.horizontalCenter: parent.horizontalCenter anchors.bottom: parent.top anchors.bottomMargin: -backgrounds.clockBottom - - locked: root.locked } Input { @@ -112,48 +110,55 @@ WlSessionLockSurface { } Loader { + id: media + active: root.screen.width > Config.lock.sizes.smallScreenWidth asynchronous: true - sourceComponent: MediaPlaying { - id: media + state: root.screen.width > Config.lock.sizes.largeScreenWidth ? "tl" : "br" + states: [ + State { + name: "tl" - isLarge: root.screen.width > Config.lock.sizes.largeScreenWidth - - state: isLarge ? "tl" : "br" - states: [ - State { - name: "tl" - - AnchorChanges { - target: media - anchors.bottom: media.parent.top - anchors.right: media.parent.left - } + AnchorChanges { + target: media + anchors.bottom: media.parent.top + anchors.right: media.parent.left + } - PropertyChanges { - media.anchors.bottomMargin: -backgrounds.mediaY - media.anchors.rightMargin: -backgrounds.mediaX - } - }, - State { - name: "br" + PropertyChanges { + media.anchors.bottomMargin: -backgrounds.mediaY + media.anchors.rightMargin: -backgrounds.mediaX + } + }, + State { + name: "br" - AnchorChanges { - target: media - anchors.top: media.parent.bottom - anchors.left: media.parent.right - } + AnchorChanges { + target: media + anchors.top: media.parent.bottom + anchors.left: media.parent.right + } - PropertyChanges { - media.anchors.topMargin: -backgrounds.mediaY - media.anchors.leftMargin: -backgrounds.mediaX - } + PropertyChanges { + media.anchors.topMargin: -backgrounds.mediaY + media.anchors.leftMargin: -backgrounds.mediaX } - ] + } + ] + + sourceComponent: MediaPlaying { + isLarge: root.screen.width > Config.lock.sizes.largeScreenWidth } } + Loader { + active: root.screen.width > Config.lock.sizes.largeScreenWidth + asynchronous: true + + sourceComponent: Buttons {} + } + component Anim: NumberAnimation { duration: Appearance.anim.durations.large easing.type: Easing.BezierSpline |