mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-18 17:42:59 +00:00
NumberField story: the unit-after row's Field holds only the field, the unit follows it
This commit is contained in:
@@ -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)))
|
||||
|
||||
Reference in New Issue
Block a user