diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-08-17 16:06:38 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-08-17 16:06:38 +1000 |
| commit | 5c93d07a8e8b4c0b4cea76a5f4d259a08c1c277a (patch) | |
| tree | a312e33f38e463c0ccef5c76199fbb9c18cca9f5 /modules/lock | |
| parent | lock: refactor (diff) | |
| download | caelestia-shell-5c93d07a8e8b4c0b4cea76a5f4d259a08c1c277a.tar.gz caelestia-shell-5c93d07a8e8b4c0b4cea76a5f4d259a08c1c277a.tar.bz2 caelestia-shell-5c93d07a8e8b4c0b4cea76a5f4d259a08c1c277a.zip | |
internal: scale rounding properly
Diffstat (limited to 'modules/lock')
| -rw-r--r-- | modules/lock/LockSurface.qml | 5 | ||||
| -rw-r--r-- | modules/lock/Media.qml | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/modules/lock/LockSurface.qml b/modules/lock/LockSurface.qml index acdc7f2..7a8535b 100644 --- a/modules/lock/LockSurface.qml +++ b/modules/lock/LockSurface.qml @@ -40,7 +40,7 @@ WlSessionLockSurface { Anim { target: lockBg property: "radius" - to: lockContent.size / 4 + to: lockContent.radius } Anim { target: content @@ -183,6 +183,7 @@ WlSessionLockSurface { id: lockContent readonly property int size: lockIcon.implicitHeight + Appearance.padding.large * 4 + readonly property int radius: size / 4 * Appearance.rounding.scale anchors.centerIn: parent implicitWidth: size @@ -196,7 +197,7 @@ WlSessionLockSurface { anchors.fill: parent color: Colours.palette.m3surface - radius: parent.size / 4 + radius: parent.radius opacity: Colours.transparency.enabled ? Colours.transparency.base : 1 layer.enabled: true diff --git a/modules/lock/Media.qml b/modules/lock/Media.qml index be289eb..59bed16 100644 --- a/modules/lock/Media.qml +++ b/modules/lock/Media.qml @@ -163,7 +163,7 @@ Item { implicitHeight: controlIcon.implicitHeight + Appearance.padding.normal * 2 color: active ? Colours.palette[`m3${colour.toLowerCase()}`] : Colours.palette[`m3${colour.toLowerCase()}Container`] - radius: active || controlState.pressed ? Appearance.rounding.normal : Math.min(implicitWidth, implicitHeight) / 2 + radius: active || controlState.pressed ? Appearance.rounding.normal : Math.min(implicitWidth, implicitHeight) / 2 * Math.min(1, Appearance.rounding.scale) Elevation { anchors.fill: parent |