From 5c93d07a8e8b4c0b4cea76a5f4d259a08c1c277a Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Sun, 17 Aug 2025 16:06:38 +1000 Subject: internal: scale rounding properly --- modules/lock/LockSurface.qml | 5 +++-- modules/lock/Media.qml | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'modules/lock') 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 -- cgit v1.2.3-freya