fix(sound): use go_next_item for device profiles button
This commit is contained in:
parent
4b1f388a4f
commit
6db1e6a17b
1 changed files with 6 additions and 17 deletions
|
|
@ -451,24 +451,13 @@ fn device_profiles() -> Section<crate::pages::Message> {
|
||||||
.descriptions(descriptions)
|
.descriptions(descriptions)
|
||||||
.view::<Page>(move |_binder, page, section| {
|
.view::<Page>(move |_binder, page, section| {
|
||||||
let descriptions = §ion.descriptions;
|
let descriptions = §ion.descriptions;
|
||||||
let button = widget::row::with_children(vec![
|
|
||||||
horizontal_space().into(),
|
|
||||||
widget::icon::from_name("go-next-symbolic").size(16).into(),
|
|
||||||
]);
|
|
||||||
|
|
||||||
let device_profiles = settings::item::builder(&*descriptions[button_txt])
|
settings::section()
|
||||||
.control(button)
|
.add(crate::widget::go_next_item(
|
||||||
.spacing(16)
|
&descriptions[button_txt],
|
||||||
.apply(widget::container)
|
crate::pages::Message::Page(page.device_profiles),
|
||||||
.width(Length::Fill)
|
))
|
||||||
.class(cosmic::theme::Container::List)
|
.into()
|
||||||
.apply(widget::button::custom)
|
|
||||||
.width(Length::Fill)
|
|
||||||
.class(cosmic::theme::Button::Transparent)
|
|
||||||
.on_press(crate::pages::Message::Page(page.device_profiles))
|
|
||||||
.width(Length::Fill);
|
|
||||||
|
|
||||||
settings::section().add(device_profiles).into()
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue