quickshell: fix 2px border corner geometry, align rounding with hyprland
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
fc0c163b0b
commit
4f2053b584
1 changed files with 13 additions and 12 deletions
|
|
@ -274,9 +274,9 @@ in
|
|||
y: Math.round(parent.height * 0.25)
|
||||
width: 350
|
||||
height: col.height + 16
|
||||
radius: 10
|
||||
radius: 8 // matches hyprland decoration.rounding
|
||||
color: Theme.base00
|
||||
border.width: 1
|
||||
border.width: Theme.borderWidth
|
||||
border.color: Theme.base03
|
||||
|
||||
// Swallow clicks inside the box
|
||||
|
|
@ -1072,7 +1072,7 @@ in
|
|||
ctx.strokeStyle = Theme.base03;
|
||||
ctx.lineWidth = Theme.borderWidth;
|
||||
ctx.beginPath();
|
||||
ctx.arc(0, 8, 8, 0, -Math.PI / 2, true);
|
||||
ctx.arc(0, 8, 8 + Theme.borderWidth / 2, 0, -Math.PI / 2, true);
|
||||
ctx.stroke();
|
||||
}
|
||||
}
|
||||
|
|
@ -1101,7 +1101,7 @@ in
|
|||
ctx.strokeStyle = Theme.base03;
|
||||
ctx.lineWidth = Theme.borderWidth;
|
||||
ctx.beginPath();
|
||||
ctx.arc(8, 8, 8, -Math.PI / 2, Math.PI, true);
|
||||
ctx.arc(8, 8, 8 + Theme.borderWidth / 2, -Math.PI / 2, Math.PI, true);
|
||||
ctx.stroke();
|
||||
}
|
||||
}
|
||||
|
|
@ -1138,8 +1138,9 @@ in
|
|||
// Start below the top ear, go down left side
|
||||
ctx.moveTo(o, r);
|
||||
ctx.lineTo(o, h - r);
|
||||
// Bottom-left curve
|
||||
ctx.arc(r + o, h - r - o, r, Math.PI, Math.PI / 2, true);
|
||||
// Bottom-left curve — arc centered on the corner circle so
|
||||
// the stroke's outer edge matches the bg corner exactly
|
||||
ctx.arc(r, h - r, r - o, Math.PI, Math.PI / 2, true);
|
||||
// Bottom edge
|
||||
if (dropdown.alignRight) {
|
||||
// Stop 8px before right edge — bottom-right ear continues
|
||||
|
|
@ -1147,7 +1148,7 @@ in
|
|||
} else {
|
||||
ctx.lineTo(w - r - o, h - o);
|
||||
// Bottom-right curve
|
||||
ctx.arc(w - r - o, h - r - o, r, Math.PI / 2, 0, true);
|
||||
ctx.arc(w - r, h - r, r - o, Math.PI / 2, 0, true);
|
||||
// Right side up (stop at ear height)
|
||||
ctx.lineTo(w - o, r);
|
||||
}
|
||||
|
|
@ -1192,7 +1193,7 @@ in
|
|||
ctx.strokeStyle = Theme.base03;
|
||||
ctx.lineWidth = Theme.borderWidth;
|
||||
ctx.beginPath();
|
||||
ctx.arc(0, 8, 8, 0, -Math.PI / 2, true);
|
||||
ctx.arc(0, 8, 8 + Theme.borderWidth / 2, 0, -Math.PI / 2, true);
|
||||
ctx.stroke();
|
||||
}
|
||||
}
|
||||
|
|
@ -2375,7 +2376,7 @@ in
|
|||
ctx.strokeStyle = Theme.base03;
|
||||
ctx.lineWidth = Theme.borderWidth;
|
||||
ctx.beginPath();
|
||||
ctx.arc(0, 8, 8, 0, -Math.PI / 2, true);
|
||||
ctx.arc(0, 8, 8 + Theme.borderWidth / 2, 0, -Math.PI / 2, true);
|
||||
ctx.stroke();
|
||||
}
|
||||
}
|
||||
|
|
@ -2404,7 +2405,7 @@ in
|
|||
ctx.strokeStyle = Theme.base03;
|
||||
ctx.lineWidth = Theme.borderWidth;
|
||||
ctx.beginPath();
|
||||
ctx.arc(8, 8, 8, -Math.PI / 2, Math.PI, true);
|
||||
ctx.arc(8, 8, 8 + Theme.borderWidth / 2, -Math.PI / 2, Math.PI, true);
|
||||
ctx.stroke();
|
||||
}
|
||||
}
|
||||
|
|
@ -2436,9 +2437,9 @@ in
|
|||
ctx.beginPath();
|
||||
ctx.moveTo(o, r);
|
||||
ctx.lineTo(o, h - r);
|
||||
ctx.arc(r + o, h - r - o, r, Math.PI, Math.PI / 2, true);
|
||||
ctx.arc(r, h - r, r - o, Math.PI, Math.PI / 2, true);
|
||||
ctx.lineTo(w - r - o, h - o);
|
||||
ctx.arc(w - r - o, h - r - o, r, Math.PI / 2, 0, true);
|
||||
ctx.arc(w - r, h - r, r - o, Math.PI / 2, 0, true);
|
||||
ctx.lineTo(w - o, r);
|
||||
ctx.stroke();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue