Skip to content

feat(gpui): smooth rounded corners into squircles - #20

Merged
nolight132 merged 4 commits into
masterfrom
feat/squircle
Oct 17, 2026
Merged

nolight132 merged 4 commits into
masterfrom
feat/squircle

Conversation

@nolight132

@nolight132 nolight132 commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

Summary

  • add corner_smoothing and squircle to Styled, and corner_smoothing to PaintQuad, to smooth rounded corners from circular arcs towards the continuous corners of iOS
  • shape smoothed corners as superellipses that reach further along each edge and cross the diagonal where the round corner would, in the WGSL, HLSL and Metal quad shaders
  • follow the smoothed outline in borders, backdrop blur and the shadow clip
  • keep round corners exactly as before when smoothing is 0, and keep capsules round
  • add a squircle example that steps the smoothing for fills, borders, shadows and backdrop blur
  • build the example in release on macOS and Windows in CI when the shaders change, compiling Metal with xcrun and HLSL with fxc, and upload both binaries

@nolight132

Copy link
Copy Markdown
Member Author

Tested on each platform.

@nolight132
nolight132 merged commit b5b49cc into master Oct 17, 2026
2 checks passed
@nolight132
nolight132 deleted the feat/squircle branch October 17, 2026 18:50
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