chore: apply cargo fmt

This commit is contained in:
Victoria Brekenfeld 2023-01-03 21:35:35 +01:00 committed by Michael Murphy
parent cb2b0f7b9a
commit 75687acf2f
22 changed files with 373 additions and 285 deletions

View file

@ -1,18 +1,18 @@
use super::{Page, Window};
use cosmic::{
Element,
iced::widget::{column, text},
widget::{list_column, settings, toggler},
Element,
};
use super::{Page, Window};
#[derive(Clone, Copy, Debug)]
pub enum Message {
Enable(bool)
Enable(bool),
}
#[derive(Default)]
pub struct State {
enabled: bool
enabled: bool,
}
impl State {
@ -25,16 +25,19 @@ impl State {
pub(super) fn view<'a>(&'a self, window: &'a Window) -> Element<'a, Message> {
settings::view_column(vec![
window.page_title(Page::Bluetooth),
column!(
list_column()
.add(settings::item("Bluetooth", toggler(None, self.enabled, Message::Enable))),
list_column().add(settings::item(
"Bluetooth",
toggler(None, self.enabled, Message::Enable)
)),
text("Now visible as \"TODO\", just kidding")
).spacing(8).into(),
)
.spacing(8)
.into(),
settings::view_section("Devices")
.add(settings::item("No devices found", text("")))
.into()
]).into()
.into(),
])
.into()
}
}