diff --git a/desktopenvs/hyprdrive/astro-menu/lib/border.py b/desktopenvs/hyprdrive/astro-menu/lib/border.py index 52bc7d4..ab9d2ed 100644 --- a/desktopenvs/hyprdrive/astro-menu/lib/border.py +++ b/desktopenvs/hyprdrive/astro-menu/lib/border.py @@ -49,11 +49,24 @@ def _make_draw(border: int, radius: int, color, fill_bg: bool, glow: bool): inset = border / 2 r, g, b = color if glow: + # The bloom strokes are up to 24px wide, so half of each spills OUTWARD + # past the ring. GTK clips a DrawingArea to its own (square) allocation, + # which along the straight edges trims that spill to nothing but inside + # each corner leaves the whole square patch outside the arc painted — + # solid red corners poking out from behind the rounded border. Clip the + # glow to the ring's own outer silhouette (the widget rect rounded by + # radius + inset, i.e. exactly where the crisp stroke's outer edge runs) + # so the bloom only ever reads inward and the card keeps a clean rounded + # outline. + cr.save() + _rounded_rect(cr, 0, 0, w, h, radius + inset) + cr.clip() for extra_w, alpha in _GLOW_LAYERS: _rounded_rect(cr, inset, inset, w - border, h - border, radius) cr.set_source_rgba(r, g, b, alpha) cr.set_line_width(border + extra_w) cr.stroke() + cr.restore() _rounded_rect(cr, inset, inset, w - border, h - border, radius) if fill_bg: cr.set_source_rgba(*FILL_COLOR, FILL_ALPHA)