@@ -2,7 +2,7 @@ use super::layer_panel::LayerDataTypeDiscriminant;
22use crate :: document:: properties_panel_message:: TransformOp ;
33use crate :: layout:: layout_message:: LayoutTarget ;
44use crate :: layout:: widgets:: {
5- IconLabel , LayoutRow , NumberInput , PopoverButton , Separator , SeparatorDirection , SeparatorType , TextInput , TextLabel , Widget , WidgetCallback , WidgetHolder , WidgetLayout ,
5+ ColorInput , IconLabel , LayoutRow , NumberInput , PopoverButton , Separator , SeparatorDirection , SeparatorType , TextInput , TextLabel , Widget , WidgetCallback , WidgetHolder , WidgetLayout ,
66} ;
77use crate :: message_prelude:: * ;
88
@@ -424,9 +424,9 @@ fn node_section_fill(fill: &Fill) -> Option<LayoutRow> {
424424 separator_type: SeparatorType :: Related ,
425425 direction: SeparatorDirection :: Horizontal ,
426426 } ) ) ,
427- WidgetHolder :: new( Widget :: TextInput ( TextInput {
427+ WidgetHolder :: new( Widget :: ColorInput ( ColorInput {
428428 value: color. rgba_hex( ) ,
429- on_update: WidgetCallback :: new( |text_input: & TextInput | {
429+ on_update: WidgetCallback :: new( |text_input: & ColorInput | {
430430 if let Some ( color) = Color :: from_rgba_str( & text_input. value) . or( Color :: from_rgb_str( & text_input. value) ) {
431431 let new_fill = Fill :: Solid ( color) ;
432432 PropertiesPanelMessage :: ModifyFill { fill: new_fill } . into( )
@@ -455,9 +455,9 @@ fn node_section_fill(fill: &Fill) -> Option<LayoutRow> {
455455 separator_type: SeparatorType :: Related ,
456456 direction: SeparatorDirection :: Horizontal ,
457457 } ) ) ,
458- WidgetHolder :: new( Widget :: TextInput ( TextInput {
458+ WidgetHolder :: new( Widget :: ColorInput ( ColorInput {
459459 value: gradient_1. positions[ 0 ] . 1 . rgba_hex( ) ,
460- on_update: WidgetCallback :: new( move |text_input: & TextInput | {
460+ on_update: WidgetCallback :: new( move |text_input: & ColorInput | {
461461 if let Some ( color) = Color :: from_rgba_str( & text_input. value) . or( Color :: from_rgb_str( & text_input. value) ) {
462462 let mut new_gradient = ( * gradient_1) . clone( ) ;
463463 new_gradient. positions[ 0 ] . 1 = color;
@@ -483,9 +483,9 @@ fn node_section_fill(fill: &Fill) -> Option<LayoutRow> {
483483 separator_type: SeparatorType :: Related ,
484484 direction: SeparatorDirection :: Horizontal ,
485485 } ) ) ,
486- WidgetHolder :: new( Widget :: TextInput ( TextInput {
486+ WidgetHolder :: new( Widget :: ColorInput ( ColorInput {
487487 value: gradient_2. positions[ 1 ] . 1 . rgba_hex( ) ,
488- on_update: WidgetCallback :: new( move |text_input: & TextInput | {
488+ on_update: WidgetCallback :: new( move |text_input: & ColorInput | {
489489 if let Some ( color) = Color :: from_rgba_str( & text_input. value) . or( Color :: from_rgb_str( & text_input. value) ) {
490490 let mut new_gradient = ( * gradient_2) . clone( ) ;
491491 new_gradient. positions[ 1 ] . 1 = color;
@@ -524,9 +524,9 @@ fn node_section_stroke(stroke: &Stroke) -> LayoutRow {
524524 separator_type: SeparatorType :: Related ,
525525 direction: SeparatorDirection :: Horizontal ,
526526 } ) ) ,
527- WidgetHolder :: new( Widget :: TextInput ( TextInput {
527+ WidgetHolder :: new( Widget :: ColorInput ( ColorInput {
528528 value: stroke. color( ) . rgba_hex( ) ,
529- on_update: WidgetCallback :: new( move |text_input: & TextInput | {
529+ on_update: WidgetCallback :: new( move |text_input: & ColorInput | {
530530 PropertiesPanelMessage :: ModifyStroke {
531531 color: text_input. value. clone( ) ,
532532 weight: weight as f64 ,
0 commit comments