ReferencePoint: the large picker's cells are a standard control high, as the old Canvas Size picker; its Default story shows the growth arrows around the centre pick

This commit is contained in:
aiongg
2026-11-12 14:32:50 +00:00
parent 46b36bae39
commit 46258cb5cc
2 changed files with 4 additions and 2 deletions
@@ -156,7 +156,7 @@ impl Component for ReferencePoint<'_> {
.radius(sunken.radius)
.border(edge, cx.tokens.stroke.thin),
focus: cx.focus_look(),
cell: if key.compact { cx.tokens.size.icon.md / GRID as f32 } else { cx.tokens.size.control.sm },
cell: if key.compact { cx.tokens.size.icon.md / GRID as f32 } else { cx.tokens.size.control.md },
dot: DOT,
picked_dot: if key.compact { DOT } else { DOT * 2.0 },
dot_radius: UiTokens::corner(cx.tokens.shape.radius.sm),
@@ -13,9 +13,11 @@ fn pick_top_left(fixture: &mut Fixture) {
}
}
/// Canvas Size's picker, as the old gallery's card showed it: the canvas grows both ways, so every cell around the
/// centre pick shows its arrow.
#[story(ReferencePoint<'static>, covers = [Default], drive = Drive::Custom(pick_top_left))]
fn reference_point(ui: &mut Ui, data: &mut StoryData) -> StoryOutput {
ReferencePoint::new("Reference point", Bind::bound(data.value("point", Anchor9::Centre))).show(ui).into()
ReferencePoint::new("Reference point", Bind::bound(data.value("point", Anchor9::Centre))).growth((1.0, 1.0)).show(ui).into()
}
#[story(ReferencePoint<'static>, covers = [Mixed], drive = Drive::Never)]