chore: update dependencies and examples
This commit is contained in:
parent
6c6d16d34a
commit
54bcb9ec12
10 changed files with 76 additions and 87 deletions
|
|
@ -28,13 +28,14 @@ impl State {
|
|||
column!(
|
||||
list_column().add(settings::item(
|
||||
"Bluetooth",
|
||||
toggler(None, self.enabled, Message::Enable)
|
||||
toggler(self.enabled).on_toggle(Message::Enable)
|
||||
)),
|
||||
text("Now visible as \"TODO\", just kidding")
|
||||
)
|
||||
.spacing(8)
|
||||
.into(),
|
||||
settings::view_section("Devices")
|
||||
settings::section()
|
||||
.title("Devices")
|
||||
.add(settings::item("No devices found", text("")))
|
||||
.into(),
|
||||
])
|
||||
|
|
|
|||
|
|
@ -258,12 +258,13 @@ impl State {
|
|||
match self.tab_bar.active_data() {
|
||||
None => panic!("no tab is active"),
|
||||
Some(DemoView::TabA) => settings::view_column(vec![
|
||||
settings::view_section("Debug")
|
||||
settings::section()
|
||||
.title("Debug")
|
||||
.add(settings::item("Debug theme", choose_theme))
|
||||
.add(settings::item("Debug icon theme", choose_icon_theme))
|
||||
.add(settings::item(
|
||||
"Debug layout",
|
||||
toggler(None, window.debug, Message::Debug),
|
||||
toggler(window.debug).on_toggle(Message::Debug),
|
||||
))
|
||||
.add(settings::item(
|
||||
"Scaling Factor",
|
||||
|
|
@ -276,10 +277,11 @@ impl State {
|
|||
.into(),
|
||||
]))
|
||||
.into(),
|
||||
settings::view_section("Controls")
|
||||
settings::section()
|
||||
.title("Controls")
|
||||
.add(settings::item(
|
||||
"Toggler",
|
||||
toggler(None, self.toggler_value, Message::TogglerToggled),
|
||||
toggler(self.toggler_value).on_toggle(Message::TogglerToggled),
|
||||
))
|
||||
.add(settings::item(
|
||||
"Pick List (TODO)",
|
||||
|
|
@ -299,15 +301,13 @@ impl State {
|
|||
.add(settings::item(
|
||||
"Progress",
|
||||
progress_bar(0.0..=100.0, self.slider_value)
|
||||
.width(Length::Fixed(250.0))
|
||||
.height(Length::Fixed(4.0)),
|
||||
.length(Length::Fixed(250.0))
|
||||
.girth(Length::Fixed(4.0)),
|
||||
))
|
||||
.add(settings::item_row(vec![checkbox(
|
||||
"Checkbox",
|
||||
self.checkbox_value,
|
||||
Message::CheckboxToggled,
|
||||
)
|
||||
.into()]))
|
||||
.add(settings::item_row(vec![checkbox(self.checkbox_value)
|
||||
.label("Checkbox")
|
||||
.on_toggle(Message::CheckboxToggled)
|
||||
.into()]))
|
||||
.add(settings::item(
|
||||
format!(
|
||||
"Spin Button (Range {}:{})",
|
||||
|
|
@ -354,8 +354,7 @@ impl State {
|
|||
.width(Length::Shrink)
|
||||
.on_activate(Message::MultiSelection)
|
||||
.apply(container)
|
||||
.center_x()
|
||||
.width(Length::Fill)
|
||||
.center_x(Length::Fill)
|
||||
.into(),
|
||||
text("Vertical With Spacing").into(),
|
||||
cosmic::iced::widget::row(vec![
|
||||
|
|
@ -424,13 +423,12 @@ impl State {
|
|||
])
|
||||
.padding(0)
|
||||
.into(),
|
||||
Some(DemoView::TabC) => {
|
||||
settings::view_column(vec![settings::view_section("Tab C")
|
||||
.add(text("Nothing here yet").width(Length::Fill))
|
||||
.into()])
|
||||
.padding(0)
|
||||
.into()
|
||||
}
|
||||
Some(DemoView::TabC) => settings::view_column(vec![settings::section()
|
||||
.title("Tab C")
|
||||
.add(text("Nothing here yet").width(Length::Fill))
|
||||
.into()])
|
||||
.padding(0)
|
||||
.into(),
|
||||
},
|
||||
container(text("Background container with some text").size(24))
|
||||
.layer(cosmic_theme::Layer::Background)
|
||||
|
|
|
|||
|
|
@ -147,7 +147,8 @@ impl State {
|
|||
fn view_desktop_options<'a>(&'a self, window: &'a Window) -> Element<'a, Message> {
|
||||
settings::view_column(vec![
|
||||
window.parent_page_button(DesktopPage::DesktopOptions),
|
||||
settings::view_section("Super Key Action")
|
||||
settings::section()
|
||||
.title("Super Key Action")
|
||||
.add(settings::item("Launcher", horizontal_space(Length::Fill)))
|
||||
.add(settings::item("Workspaces", horizontal_space(Length::Fill)))
|
||||
.add(settings::item(
|
||||
|
|
@ -155,38 +156,34 @@ impl State {
|
|||
horizontal_space(Length::Fill),
|
||||
))
|
||||
.into(),
|
||||
settings::view_section("Hot Corner")
|
||||
settings::section()
|
||||
.title("Hot Corner")
|
||||
.add(settings::item(
|
||||
"Enable top-left hot corner for Workspaces",
|
||||
toggler(None, self.top_left_hot_corner, Message::TopLeftHotCorner),
|
||||
toggler(self.top_left_hot_corner).on_toggle(Message::TopLeftHotCorner),
|
||||
))
|
||||
.into(),
|
||||
settings::view_section("Top Panel")
|
||||
settings::section()
|
||||
.title("Top Panel")
|
||||
.add(settings::item(
|
||||
"Show Workspaces Button",
|
||||
toggler(
|
||||
None,
|
||||
self.show_workspaces_button,
|
||||
Message::ShowWorkspacesButton,
|
||||
),
|
||||
toggler(self.show_workspaces_button).on_toggle(Message::ShowWorkspacesButton),
|
||||
))
|
||||
.add(settings::item(
|
||||
"Show Applications Button",
|
||||
toggler(
|
||||
None,
|
||||
self.show_applications_button,
|
||||
Message::ShowApplicationsButton,
|
||||
),
|
||||
toggler(self.show_applications_button)
|
||||
.on_toggle(Message::ShowApplicationsButton),
|
||||
))
|
||||
.into(),
|
||||
settings::view_section("Window Controls")
|
||||
settings::section()
|
||||
.title("Window Controls")
|
||||
.add(settings::item(
|
||||
"Show Minimize Button",
|
||||
toggler(None, self.show_minimize_button, Message::ShowMinimizeButton),
|
||||
toggler(self.show_minimize_button).on_toggle(Message::ShowMinimizeButton),
|
||||
))
|
||||
.add(settings::item(
|
||||
"Show Maximize Button",
|
||||
toggler(None, self.show_maximize_button, Message::ShowMaximizeButton),
|
||||
toggler(self.show_maximize_button).on_toggle(Message::ShowMaximizeButton),
|
||||
))
|
||||
.into(),
|
||||
])
|
||||
|
|
@ -245,12 +242,12 @@ impl State {
|
|||
list_column()
|
||||
.add(settings::item(
|
||||
"Same background on all displays",
|
||||
toggler(None, self.same_background, Message::SameBackground),
|
||||
toggler(self.same_background).on_toggle(Message::SameBackground),
|
||||
))
|
||||
.add(settings::item("Background fit", text("TODO")))
|
||||
.add(settings::item(
|
||||
"Slideshow",
|
||||
toggler(None, self.slideshow, Message::Slideshow),
|
||||
toggler(self.slideshow).on_toggle(Message::Slideshow),
|
||||
))
|
||||
.into(),
|
||||
column(image_column).spacing(16).into(),
|
||||
|
|
@ -261,7 +258,8 @@ impl State {
|
|||
fn view_desktop_workspaces<'a>(&'a self, window: &'a Window) -> Element<'a, Message> {
|
||||
settings::view_column(vec![
|
||||
window.parent_page_button(DesktopPage::Wallpaper),
|
||||
settings::view_section("Workspace Behavior")
|
||||
settings::section()
|
||||
.title("Workspace Behavior")
|
||||
.add(settings::item(
|
||||
"Dynamic workspaces",
|
||||
horizontal_space(Length::Fill),
|
||||
|
|
@ -271,7 +269,8 @@ impl State {
|
|||
horizontal_space(Length::Fill),
|
||||
))
|
||||
.into(),
|
||||
settings::view_section("Multi-monitor Behavior")
|
||||
settings::section()
|
||||
.title("Multi-monitor Behavior")
|
||||
.add(settings::item(
|
||||
"Workspaces Span Displays",
|
||||
horizontal_space(Length::Fill),
|
||||
|
|
|
|||
|
|
@ -69,14 +69,16 @@ impl State {
|
|||
list_column()
|
||||
.add(settings::item("Device name", text("TODO")))
|
||||
.into(),
|
||||
settings::view_section("Hardware")
|
||||
settings::section()
|
||||
.title("Hardware")
|
||||
.add(settings::item("Hardware model", text("TODO")))
|
||||
.add(settings::item("Memory", text("TODO")))
|
||||
.add(settings::item("Processor", text("TODO")))
|
||||
.add(settings::item("Graphics", text("TODO")))
|
||||
.add(settings::item("Disk Capacity", text("TODO")))
|
||||
.into(),
|
||||
settings::view_section("Operating System")
|
||||
settings::section()
|
||||
.title("Operating System")
|
||||
.add(settings::item("Operating system", text("TODO")))
|
||||
.add(settings::item(
|
||||
"Operating system architecture",
|
||||
|
|
@ -85,7 +87,8 @@ impl State {
|
|||
.add(settings::item("Desktop environment", text("TODO")))
|
||||
.add(settings::item("Windowing system", text("TODO")))
|
||||
.into(),
|
||||
settings::view_section("Related settings")
|
||||
settings::section()
|
||||
.title("Related settings")
|
||||
.add(settings::item("Get support", text("TODO")))
|
||||
.into(),
|
||||
])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue