fix: sliders on desktop view options
This commit is contained in:
parent
83bdc4d073
commit
9455d6f084
1 changed files with 5 additions and 4 deletions
|
|
@ -56,6 +56,7 @@ use std::{
|
||||||
env, fmt, fs,
|
env, fmt, fs,
|
||||||
future::Future,
|
future::Future,
|
||||||
io,
|
io,
|
||||||
|
num::NonZeroU16,
|
||||||
path::{Path, PathBuf},
|
path::{Path, PathBuf},
|
||||||
pin::Pin,
|
pin::Pin,
|
||||||
process,
|
process,
|
||||||
|
|
@ -1747,9 +1748,9 @@ impl App {
|
||||||
widget::settings::item::builder(fl!("icon-size"))
|
widget::settings::item::builder(fl!("icon-size"))
|
||||||
.description(format!("{icon_size}%"))
|
.description(format!("{icon_size}%"))
|
||||||
.control(
|
.control(
|
||||||
widget::slider(50..=500, icon_size.get(), move |_| {
|
widget::slider(50..=500, icon_size.get(), move |new_value| {
|
||||||
Message::DesktopConfig(DesktopConfig {
|
Message::DesktopConfig(DesktopConfig {
|
||||||
icon_size,
|
icon_size: NonZeroU16::new(new_value).unwrap_or(icon_size),
|
||||||
..config
|
..config
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
@ -1762,9 +1763,9 @@ impl App {
|
||||||
widget::settings::item::builder(fl!("grid-spacing"))
|
widget::settings::item::builder(fl!("grid-spacing"))
|
||||||
.description(format!("{grid_spacing}%"))
|
.description(format!("{grid_spacing}%"))
|
||||||
.control(
|
.control(
|
||||||
widget::slider(50..=500, grid_spacing.get(), move |_| {
|
widget::slider(50..=500, grid_spacing.get(), move |new_value| {
|
||||||
Message::DesktopConfig(DesktopConfig {
|
Message::DesktopConfig(DesktopConfig {
|
||||||
grid_spacing,
|
grid_spacing: NonZeroU16::new(new_value).unwrap_or(grid_spacing),
|
||||||
..config
|
..config
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue