Skip to content

fix(palette): let the palette shadow fade out instead of cutting off - #33

Merged
WolffTech merged 1 commit into
mainfrom
t3code/fix-command-palette-shadow
Sep 25, 2026
Merged

WolffTech merged 1 commit into
mainfrom
t3code/fix-command-palette-shadow

Conversation

@WolffTech

Copy link
Copy Markdown
Owner

In light mode, the command palette's drop shadow looked square. It stopped at a hard edge before it faded out.

The panel is a borderless window. It leaves a transparent margin around the glass so a SwiftUI shadow can follow the rounded corners. That margin was 32pt. The shadow uses a 16pt radius and an 8pt downward offset, so it reaches about 34pt past the glass on the sides and about 42pt below it. The window edge cut the shadow off while it was still visible.

The shadow's radius and offset now live in PaletteMetrics, and the margin is calculated from them (3 * radius + offset, which is 56pt). Changing the shadow later can't bring the clipping back.

Testing

  • Rendered the shadow offscreen with ImageRenderer. With a 32pt margin the edge pixels were still visible. With 56pt they were fully transparent.
  • The app builds (Debug).
  • Not tested: checking the palette by eye in the running app.

- Widen the panel margin so the shadow fades out before the edge
- Derive the margin from the shadow radius and offset
@WolffTech
WolffTech merged commit 997630a into main Sep 25, 2026
2 checks passed
@WolffTech
WolffTech deleted the t3code/fix-command-palette-shadow branch November 10, 2026 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant