Charts · Navigation · Forms: band names widen a sideways chart's gutter; Pagination takes a size, speaks the locale and jumps to a typed page

- A horizontal chart's gutter grows to its widest band name, floored at the theme gutter and capped at half the chart; a name past the cap ends in an ellipsis (#10).
- Pagination's previous and next tooltips read i18n (English and zh-CN built in, app catalogs override); `.size(ControlSize)` sizes every control, Sm by default; `.jump()` adds a Go to field (#11).
- NumberInput keys the owner's value as shown: a draft survives a blur, a value set while focused lands when focus leaves, and an echo of its own commit is no new value. A ranged field holds room for its widest bound through `Input::least`.
This commit is contained in:
ZacharyZhang-NY committed 2026-10-06 13:29:09 -04:00
1 parent 2ce336895c
commit bd3772ad54
17 files changed
+438 -51

No files matched your search

+4 -2
View File
@@ -58,14 +58,16 @@ pub fn pagination(window: &mut Window, cx: &mut App) -> impl IntoElement + use<>
let now = *page.read(cx);
section(
"Pagination",
"The first, the last, and the pages around this one. A gap stands for two or more pages.",
"The first, the last, and the pages around this one. A gap stands for two or more pages. Type a page to go there.",
cx,
)
.child(specimen(
format!("page {now} of 20"),
probe(
"pagination",
Pagination::new("pagination", now, 20).on_change(move |to, _, cx| set(&page, to, cx)),
Pagination::new("pagination", now, 20)
.jump()
.on_change(move |to, _, cx| set(&page, to, cx)),
),
cx,
))