From 5b3d2c1523778787247495edc9a53e52bf99d4b9 Mon Sep 17 00:00:00 2001 From: rope Date: Tue, 26 May 2026 14:52:42 +0100 Subject: [PATCH] quickshell: fix concave corner orientation Filled area was at the bottom of each corner instead of the top. Flipped arcs so fill connects to bar above and calendar beside. Co-Authored-By: Claude Opus 4.6 --- settings/hyprland.nix | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/settings/hyprland.nix b/settings/hyprland.nix index 35086ba..42445e6 100644 --- a/settings/hyprland.nix +++ b/settings/hyprland.nix @@ -870,14 +870,13 @@ in var r = width; ctx.clearRect(0, 0, width, height); ctx.fillStyle = "#D1${c.base00}"; - // Draw filled area: full square minus quarter-circle cutout - // The quarter circle is centered at top-left (0,0), radius = width + // Concave: filled at top+right, empty curve at bottom-left + // Arc centered at bottom-left (0, r) ctx.beginPath(); - ctx.moveTo(r, 0); // top-right corner - ctx.lineTo(r, r); // bottom-right corner - ctx.lineTo(0, r); // bottom-left corner - // Arc from bottom-left back to top-right, curving inward - ctx.arc(0, 0, r, Math.PI / 2, 0, true); + ctx.moveTo(0, 0); + ctx.lineTo(r, 0); + ctx.lineTo(r, r); + ctx.arc(0, r, r, 0, -Math.PI / 2, true); ctx.closePath(); ctx.fill(); } @@ -898,14 +897,12 @@ in var r = width; ctx.clearRect(0, 0, width, height); ctx.fillStyle = "#D1${c.base00}"; - // Draw filled area: full square minus quarter-circle cutout - // The quarter circle is centered at top-right (width,0), radius = width + // Concave: filled at top+left, empty curve at bottom-right + // Arc centered at bottom-right (r, r) ctx.beginPath(); - ctx.moveTo(0, 0); // top-left corner - ctx.lineTo(0, r); // bottom-left corner - ctx.lineTo(r, r); // bottom-right corner - // Arc from bottom-right back to top-left, curving inward - ctx.arc(r, 0, r, Math.PI / 2, Math.PI, false); + ctx.moveTo(0, 0); + ctx.lineTo(r, 0); + ctx.arc(r, r, r, -Math.PI / 2, Math.PI, true); ctx.closePath(); ctx.fill(); }