Organize the categories of widget component props

This commit is contained in:
Keavon Chambers
2025-12-23 21:23:13 -08:00
parent 6dea184b03
commit 63217feac6
50 changed files with 643 additions and 729 deletions
@@ -83,16 +83,16 @@ impl ToolColorOptions {
let mut widgets = vec![TextLabel::new(label_text).widget_instance()];
if !color_allow_none {
widgets.push(Separator::new(SeparatorType::Unrelated).widget_instance());
widgets.push(Separator::new(SeparatorStyle::Unrelated).widget_instance());
} else {
let reset = IconButton::new("CloseX", 12)
.disabled(self.custom_color.is_none() && self.color_type == ToolColorType::Custom)
.tooltip_label("Clear Color")
.on_update(reset_callback);
widgets.push(Separator::new(SeparatorType::Related).widget_instance());
widgets.push(Separator::new(SeparatorStyle::Related).widget_instance());
widgets.push(reset.widget_instance());
widgets.push(Separator::new(SeparatorType::Related).widget_instance());
widgets.push(Separator::new(SeparatorStyle::Related).widget_instance());
};
let entries = vec![
@@ -109,7 +109,7 @@ impl ToolColorOptions {
.collect();
let radio = RadioInput::new(entries).selected_index(Some(self.color_type.clone() as u32)).widget_instance();
widgets.push(radio);
widgets.push(Separator::new(SeparatorType::Related).widget_instance());
widgets.push(Separator::new(SeparatorStyle::Related).widget_instance());
let fill_choice = match self.active_color() {
Some(color) => FillChoice::Solid(color.to_gamma_srgb()),
@@ -83,7 +83,7 @@ pub fn pivot_gizmo_type_widget(state: PivotGizmoState, source: PivotToolSource)
.into(),
})
.widget_instance(),
Separator::new(SeparatorType::Related).widget_instance(),
Separator::new(SeparatorStyle::Related).widget_instance(),
DropdownInput::new(vec![gizmo_type_entries])
.selected_index(Some(match state.gizmo_type {
PivotGizmoType::Pivot => 0,