Map element-typed wires to their list forms' defaults and widgets

This commit is contained in:
Dennis Kobert
2026-08-22 11:48:27 +00:00
parent da0f70bb5f
commit 4b130b4319
2 changed files with 13 additions and 0 deletions
@@ -252,6 +252,10 @@ pub(crate) fn property_from_type(
Some(x) if x == TypeId::of::<List<Color>>() => color_widget(default_info, ColorInput::default().allow_none(true)),
Some(x) if x == TypeId::of::<List<GradientStops>>() => color_widget(default_info, ColorInput::default().allow_none(false)),
Some(x) if x == TypeId::of::<List<BrushStroke>>() => brush_strokes_widget(default_info).into(),
// Leveled wires type by their element; each element keeps its list form's widget.
Some(x) if x == TypeId::of::<Color>() => color_widget(default_info, ColorInput::default().allow_none(true)),
Some(x) if x == TypeId::of::<GradientStops>() => color_widget(default_info, ColorInput::default().allow_none(false)),
Some(x) if x == TypeId::of::<BrushStroke>() => brush_strokes_widget(default_info).into(),
// ============
// STRUCT TYPES
// ============