NumberField story: the unit-after row's Field holds only the field, the unit follows it

This commit is contained in:
aiongg
2026-11-17 19:39:34 +00:00
parent 12dfe2c497
commit bb56cb044f
+3 -3
View File
@@ -55,16 +55,16 @@ fn number_field(ui: &mut Ui, data: &mut StoryData) -> StoryOutput {
.size(size)
.show(ui);
});
row("Unit after").show(ui, |ui, _| {
Row::new().show(ui, |ui, _| {
Row::new().show(ui, |ui, _| {
row("Unit after").show(ui, |ui, _| {
NumberField::new("Angle", Bind::bound(data.value("angle", Some(120.0))))
.range(0.0..=360.0)
.unit_kind(UnitKind::Degrees)
.unit_placement(UnitPlacement::After)
.size(size)
.show(ui);
Text::new(units.symbol(UnitKind::Degrees)).show(ui);
});
Text::new(units.symbol(UnitKind::Degrees)).show(ui);
});
row("Mixed").show(ui, |ui, _| {
NumberField::new("Mixed size", Bind::bound_mixed(data.value("mixed", Mixed::<Option<f64>>::Mixed)))