SIGN IN SIGN UP

theme: Follow the global radius setting everywhere (#2762)

Setting `Theme::radius` to `0` used to leave a scatter of permanently
round elements behind. This routes every hardcoded radius through the
theme so one setting governs the whole UI.

New in `crates/ui`:

- `Theme::radius_full()` — the circle/pill radius, which is `0` when
`radius` is.
- `ThemeStyled::rounded_full_style(cx)` — the element form, replacing
`rounded_full()`.
- `Theme::sync_base(cx)` — pushes the theme down to the Base layer.

Fixed: avatar, badge, radio mark, slider thumb/ring/bar, stepper
indicator, Pill and Outline tabs, progress bar, tooltip surface,
`DescriptionList` frame, plot legend swatch, the code-fold button, and
matching chrome across the story gallery and examples.

Two separate bugs surfaced along the way. The segmented tab's inner
radius went **negative** at radius 0 (`radius − 2px`); it is now floored
at zero. And the scrollbar paints from the Base layer's own copy of the
theme, which was only rebuilt inside `Theme::change` — so writing to
`Theme::radius` directly never reached it and the thumb kept its old
radius. That projection is now `Theme::base_theme()`, and
`Theme::sync_base(cx)` pushes it down.

Left alone deliberately: caller-supplied radii in the "Custom
shape/style" stories, plotted data marks (scatter dots, pie, radar), and
the `gpui-fps` HUD, which has no `gpui-component` dependency.

The rule and its exceptions are written up in
`docs/STYLING-AND-MOTION.md § Corner Radius`.

No breaking changes — the public API additions are additive.

> AI-generated with Claude Code, reviewed by @huacnlee.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
J
Jason Lee committed
222cf9644fbfd9bdff970a0308f9ce216b2c0818
Parent: 7acfc18
Committed by GitHub <noreply@github.com> on 8/18/2026, 11:38:15 AM