design-lint: props: derive the setters of ui-widgets components (#[prop]) and drop the hand setters

This commit is contained in:
aiongg
2026-11-16 13:27:45 +00:00
parent bc9b545e5f
commit da0fcfd21a
+3 -9
View File
@@ -154,7 +154,9 @@ pub struct LinkedFields<'a, const N: usize> {
/// Each field's own range.
#[prop]
ranges: Option<[RangeInclusive<f64>; N]>,
/// The lengths every field keeps and shows (`LinkedFields::lengths`); plain numbers without it.
/// Makes every field a length field (`NumberField::length`): the values are kept in `units.stored` and shown in
/// `units.shown`. `range` is then in the stored unit.
#[prop]
lengths: Option<LengthUnits>,
}
@@ -176,14 +178,6 @@ impl<'a, const N: usize> LinkedFields<'a, N> {
.label(label)
}
/// Makes every field a length field (`NumberField::length`): the values are kept in `units.stored` and shown in
/// `units.shown`. `range` is then in the stored unit.
#[must_use]
pub fn lengths(mut self, units: LengthUnits) -> Self {
self.lengths = Some(units);
self
}
/// Shows a caption with each field that also scrubs it, and names the field: inside the field at its start in the
/// `Row` layout, beside it in the others. Without captions a field is named by the group's label and its position.
#[must_use]