mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-22 08:48:11 +08:00
Redesign ColorInput widget and rename it to ColorButton
This commit is contained in:
@@ -65,7 +65,7 @@ impl ToolColorOptions {
|
||||
color_allow_none: bool,
|
||||
reset_callback: impl Fn(&IconButton) -> Message + 'static + Send + Sync,
|
||||
radio_callback: fn(ToolColorType) -> WidgetCallback<()>,
|
||||
color_callback: impl Fn(&ColorInput) -> Message + 'static + Send + Sync,
|
||||
color_callback: impl Fn(&ColorButton) -> Message + 'static + Send + Sync,
|
||||
) -> Vec<WidgetHolder> {
|
||||
let mut widgets = vec![TextLabel::new(label_text).widget_holder()];
|
||||
|
||||
@@ -98,8 +98,8 @@ impl ToolColorOptions {
|
||||
widgets.push(radio);
|
||||
widgets.push(Separator::new(SeparatorType::Related).widget_holder());
|
||||
|
||||
let color_input = ColorInput::new(self.active_color()).allow_none(color_allow_none).on_update(color_callback);
|
||||
widgets.push(color_input.widget_holder());
|
||||
let color_button = ColorButton::new(self.active_color()).allow_none(color_allow_none).on_update(color_callback);
|
||||
widgets.push(color_button.widget_holder());
|
||||
|
||||
widgets
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user