dashboard: fix media visualiser spacing
Fix the spacing between the visualiser and cover
This commit is contained in:
parent
0c7d782d17
commit
e2cf98f944
1 changed files with 7 additions and 6 deletions
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue