diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-25 16:25:18 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-25 16:25:18 +1000 |
| commit | 73682163cac8a00606683a45775cdbf9d84bc0b0 (patch) | |
| tree | fa11834c5e1861ad401cb3ffaa79b02a0afaf0e0 /modules/lock/LockSurface.qml | |
| parent | lock: fix exit anim for multimon (diff) | |
| download | caelestia-shell-73682163cac8a00606683a45775cdbf9d84bc0b0.tar.gz caelestia-shell-73682163cac8a00606683a45775cdbf9d84bc0b0.tar.bz2 caelestia-shell-73682163cac8a00606683a45775cdbf9d84bc0b0.zip | |
lock: move media to bottom right if small screen
Diffstat (limited to 'modules/lock/LockSurface.qml')
| -rw-r--r-- | modules/lock/LockSurface.qml | 40 |
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 { |