Repository navigation
Description
What happens
Since #170 turned on the window shadow for popups, a popup with a shadowColor gets a thin dark outline outside its own edge. The outline follows the popup's rounded corners, with a gap between it and the popup. The gap grows with shadowRadius. With shadowRadius: 14, the outline sits about 15 pt outside the popup's 1 pt border, and the popup's soft shadow shows in between. It looks like a second, larger frame around the popup.
Steps to reproduce
- Run a build that includes feat: fade popups in with a shadow and the system material #170 (bec220b), in dark appearance, on a dark wallpaper.
- Add this widget (it passes
--validate):{ "id": "shadow-demo", "type": "script", "position": "right", "command": "echo Popup", "interval": 600, "popup": { "style": { "width": 360, "cornerRadius": 14, "shadowColor": "#00000059", "shadowRadius": 14 }, "layout": { "type": "text", "text": "A popup with a 14 pt shadow" } } } - Click the widget.
Expected
One shadow around the popup's own edge, with no outline floating outside it, as before #170.
Environment
- StableBar 0.6.0-beta.20261022054830.236
- macOS 26.6.2, dark appearance
- Liquid Glass on for popups (
bar.glass.popups: true,transparency: 0.4) - Popup from a local package:
cornerRadius: 14,shadowColor: "#00000059",shadowRadius: 14, over a theme whose popups have a 1 ptborderColor
Evidence
Screenshot attached below. It's at 1x: the popup's 14 pt corner spans about 14 px. One row of pixels, from the desktop inwards:
| Pixels | Color | What it is |
|---|---|---|
| desktop | #171e26, darkening slightly |
the window server's shadow |
| 2 px | #060708, with a 1 px #2a2c2e on some rows |
the outline |
| 13 px | #151b22 fading to #10151b |
the popup's own SwiftUI shadow |
| 1 px | #303631 |
the theme's popup border |
| inside | #111814 |
the popup's background |
The outline sits at the outer edge of the SwiftUI shadow, not at the popup.
Diagnosis
In Sources/StableBar/WidgetPopup.swift, WidgetPopup.open stacks two shadows:
- The popup's SwiftUI view draws its own shadow. It pads itself by
shadowInset(shadowRadius * 2 + 2) so the shadow fits inside the window:.shadow(color: appearance.shadowColor, radius: appearance.shadowRadius, y: 1) .padding(shadowInset)
- The panel is borderless, with
isOpaque = falseandbackgroundColor = .clear. Since feat: fade popups in with a shadow and the system material #170 it also hashasShadow = true, and it callsinvalidateShadow()after opening and after each resize.
For a borderless, transparent window, the window server builds the shadow from the shape of every pixel that isn't fully transparent. Here that shape includes the SwiftUI shadow's halo. So the system draws its shadow, with its crisp dark edge, around the halo where it fades out, about shadowRadius points outside the popup. Before #170, hasShadow was false and only the SwiftUI shadow drew. #170 mentions the stacking ("The theme's SwiftUI shadow … now sits on top of the window shadow"), but it wasn't run in the app before merging.
Every popup whose style resolves to a visible shadowColor is affected. Most bundled themes set one in popupDefaults. Their popups use the default shadowRadius of 2, or 6 in Rose Pine, so the gap is small there and easy to miss. A popup with a larger radius makes it obvious. Tooltips keep hasShadow = false and aren't affected.
Possible directions (untested):
- Turn on the window shadow only when the popup has no
shadowColor, and otherwise keep the SwiftUI shadow alone, as before feat: fade popups in with a shadow and the system material #170. - Or drop the SwiftUI shadow on popups and leave the shadow to the window. That would ignore
shadowColorandshadowRadiusfor popups.
Either way, the README's popup section ("Popups cast the system's window shadow, under the shadowColor shadow if one is set") needs to match.
Related
- feat: fade popups in with a shadow and the system material #170 added the window shadow. This is a regression from it, only in betas so far: no stable release contains bec220b.
- feat: draw widgets, popups and the bar with Liquid Glass #98 draws popups with Liquid Glass. It isn't the cause: the outline lands outside the glass shape, beyond the SwiftUI shadow.
- No open issue or pull request covers popup outlines or shadows.
Triaged by Claude Code (Claude Opus 5.5).
Activity
chore(release): 0.6.0 [skip ci]
stablebar-releases commentedon Oct 23, 2026
🎉 This issue has been resolved in version 0.6.0 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀