Add 'Single click to open' settings toggle

This commit is contained in:
CaelusV 2024-12-07 23:01:14 +01:00
parent fac5a25a3f
commit 20e571efab
4 changed files with 35 additions and 0 deletions

View file

@ -1557,6 +1557,8 @@ impl App {
}
fn settings(&self) -> Element<Message> {
let tab_config = self.config.tab;
// TODO: Should dialog be updated here too?
widget::settings::view_column(vec![
widget::settings::section()
@ -1595,6 +1597,20 @@ impl App {
Message::SetTypeToSearch,
))
.into(),
widget::settings::section()
.title(fl!("other"))
.add({
widget::settings::item::builder(fl!("single-click")).toggler(
tab_config.single_click,
move |single_click| {
Message::TabConfig(TabConfig {
single_click,
..tab_config
})
},
)
})
.into(),
])
.into()
}