fix(appearance): use picker button

This commit is contained in:
Ashley Wulber 2024-03-06 15:26:22 -05:00 • committed by Michael Murphy
parent 56e04a7d81
commit 87f8e4bd4b

View file

@ -1189,17 +1189,13 @@ pub fn mode_and_colors() -> Section<crate::pages::Message> {
.add( .add(
settings::item::builder(&*descriptions[4]) settings::item::builder(&*descriptions[4])
.description(&*descriptions[5]) .description(&*descriptions[5])
.control( .control(if page.container_background.get_applied_color().is_some() {
if let Some(c) = page.container_background.get_applied_color() { Element::from(
container(color_button( page.container_background
Some(Message::ContainerBackground( .picker_button(Message::ContainerBackground, Some(24))
ColorPickerUpdate::ToggleColorPicker, .width(Length::Fixed(48.0))
)), .height(Length::Fixed(24.0)),
c, )
true,
48,
24,
))
} else { } else {
container( container(
button::text(fl!("auto")) button::text(fl!("auto"))
@ -1208,8 +1204,8 @@ pub fn mode_and_colors() -> Section<crate::pages::Message> {
ColorPickerUpdate::ToggleColorPicker, ColorPickerUpdate::ToggleColorPicker,
)), )),
) )
}, .into()
), }),
) )
.add( .add(
settings::item::builder(&*descriptions[8]) settings::item::builder(&*descriptions[8])