fix(appearance): use picker button
This commit is contained in:
parent
56e04a7d81
commit
87f8e4bd4b
1 changed files with 15 additions and 19 deletions
|
|
@ -1189,27 +1189,23 @@ pub fn mode_and_colors() -> Section<crate::pages::Message> {
|
|||
.add(
|
||||
settings::item::builder(&*descriptions[4])
|
||||
.description(&*descriptions[5])
|
||||
.control(
|
||||
if let Some(c) = page.container_background.get_applied_color() {
|
||||
container(color_button(
|
||||
Some(Message::ContainerBackground(
|
||||
.control(if page.container_background.get_applied_color().is_some() {
|
||||
Element::from(
|
||||
page.container_background
|
||||
.picker_button(Message::ContainerBackground, Some(24))
|
||||
.width(Length::Fixed(48.0))
|
||||
.height(Length::Fixed(24.0)),
|
||||
)
|
||||
} else {
|
||||
container(
|
||||
button::text(fl!("auto"))
|
||||
.trailing_icon(from_name("go-next-symbolic"))
|
||||
.on_press(Message::ContainerBackground(
|
||||
ColorPickerUpdate::ToggleColorPicker,
|
||||
)),
|
||||
c,
|
||||
true,
|
||||
48,
|
||||
24,
|
||||
))
|
||||
} else {
|
||||
container(
|
||||
button::text(fl!("auto"))
|
||||
.trailing_icon(from_name("go-next-symbolic"))
|
||||
.on_press(Message::ContainerBackground(
|
||||
ColorPickerUpdate::ToggleColorPicker,
|
||||
)),
|
||||
)
|
||||
},
|
||||
),
|
||||
)
|
||||
.into()
|
||||
}),
|
||||
)
|
||||
.add(
|
||||
settings::item::builder(&*descriptions[8])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue