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(
|
.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))
|
||||||
|
.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,
|
ColorPickerUpdate::ToggleColorPicker,
|
||||||
)),
|
)),
|
||||||
c,
|
)
|
||||||
true,
|
.into()
|
||||||
48,
|
}),
|
||||||
24,
|
|
||||||
))
|
|
||||||
} else {
|
|
||||||
container(
|
|
||||||
button::text(fl!("auto"))
|
|
||||||
.trailing_icon(from_name("go-next-symbolic"))
|
|
||||||
.on_press(Message::ContainerBackground(
|
|
||||||
ColorPickerUpdate::ToggleColorPicker,
|
|
||||||
)),
|
|
||||||
)
|
|
||||||
},
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
.add(
|
.add(
|
||||||
settings::item::builder(&*descriptions[8])
|
settings::item::builder(&*descriptions[8])
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue