diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-05-28 11:07:29 +0800 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-05-28 11:07:29 +0800 |
| commit | e2cf98f944805db174ea4fc7a581618b287a31f9 (patch) | |
| tree | b69ed8fb2a8495d07a0a6e992c9ceaad85341bac | |
| parent | dashboard: animate text (diff) | |
| download | caelestia-shell-e2cf98f944805db174ea4fc7a581618b287a31f9.tar.gz caelestia-shell-e2cf98f944805db174ea4fc7a581618b287a31f9.tar.bz2 caelestia-shell-e2cf98f944805db174ea4fc7a581618b287a31f9.zip | |
dashboard: fix media visualiser spacing
Fix the spacing between the visualiser and cover
| -rw-r--r-- | modules/dashboard/Media.qml | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/modules/dashboard/Media.qml b/modules/dashboard/Media.qml index 4f4bc7e..7b1bf2b 100644 --- a/modules/dashboard/Media.qml +++ b/modules/dashboard/Media.qml @@ -72,11 +72,16 @@ Item { const values = root.cava; const len = values.length; + + ctx.strokeStyle = Colours.palette.m3primary; + ctx.lineWidth = 360 / len - Appearance.spacing.small / 4; + ctx.lineCap = "round"; + const size = DashboardConfig.sizes.mediaVisualiserSize; const cx = centerX; const cy = centerY; - const rx = innerX; - const ry = innerY; + const rx = innerX + ctx.lineWidth / 2; + const ry = innerY + ctx.lineWidth / 2; for (let i = 0; i < len; i++) { const v = Math.max(1, Math.min(100, values[i])); @@ -90,10 +95,6 @@ Item { ctx.lineTo(cx + (rx + magnitude) * cos, cy + (ry + magnitude) * sin); } - ctx.strokeStyle = Colours.palette.m3primary; - ctx.lineWidth = 360 / len - Appearance.spacing.small / 4; - ctx.lineCap = "round"; - ctx.stroke(); } } |