summaryrefslogtreecommitdiff
path: root/modules/lock/LockSurface.qml
diff options
context:
space:
mode:
Diffstat (limited to 'modules/lock/LockSurface.qml')
-rw-r--r--modules/lock/LockSurface.qml40
1 files changed, 36 insertions, 4 deletions
diff --git a/modules/lock/LockSurface.qml b/modules/lock/LockSurface.qml
index b846241..87f9cb0 100644
--- a/modules/lock/LockSurface.qml
+++ b/modules/lock/LockSurface.qml
@@ -71,6 +71,7 @@ WlSessionLockSurface {
locked: root.locked
weatherWidth: weather.implicitWidth
+ isLarge: root.screen.width > 1920
visible: false
}
@@ -108,10 +109,41 @@ WlSessionLockSurface {
}
MediaPlaying {
- anchors.bottom: parent.top
- anchors.right: parent.left
- anchors.bottomMargin: -backgrounds.mediaBottom
- anchors.rightMargin: -backgrounds.mediaRight
+ id: media
+
+ isLarge: root.screen.width > 1920
+
+ state: isLarge ? "tl" : "br"
+ states: [
+ State {
+ name: "tl"
+
+ 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"
+
+ AnchorChanges {
+ target: media
+ anchors.top: media.parent.bottom
+ anchors.left: media.parent.right
+ }
+
+ PropertyChanges {
+ media.anchors.topMargin: -backgrounds.mediaY
+ media.anchors.leftMargin: -backgrounds.mediaX
+ }
+ }
+ ]
}
component Anim: NumberAnimation {