From e2cf98f944805db174ea4fc7a581618b287a31f9 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Wed, 28 May 2025 11:07:29 +0800 Subject: dashboard: fix media visualiser spacing Fix the spacing between the visualiser and cover --- modules/dashboard/Media.qml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'modules/dashboard/Media.qml') 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(); } } -- cgit v1.2.3-freya