fix(settings): simplify shortcut guide picker
This commit is contained in:
1 parent
8b46a5168f
commit
a31ed6e510
2 files changed
+3
-3
No files matched your search
@@ -113,14 +113,14 @@ memory_max = "8G"
|
||||
|
||||
#[test]
|
||||
fn shortcut_hints_support_global_main_and_selective_hiding() {
|
||||
let mut ui = Ui::default();
|
||||
let mut ui: Ui = toml::from_str("hidden_shortcut_hints = []").unwrap();
|
||||
assert!(
|
||||
ShortcutHintScope::AREAS
|
||||
.iter()
|
||||
.all(|scope| ui.show_shortcut_hints(*scope))
|
||||
);
|
||||
|
||||
ui.hidden_shortcut_hints = [ShortcutHintScope::Main].into_iter().collect();
|
||||
ui = toml::from_str("hidden_shortcut_hints = [\"main\"]").unwrap();
|
||||
assert!(!ui.show_shortcut_hints(ShortcutHintScope::Instances));
|
||||
assert!(ui.show_shortcut_hints(ShortcutHintScope::Popups));
|
||||
|
||||
|
||||
@@ -421,7 +421,7 @@ impl State {
|
||||
SettingsPickerOption {
|
||||
key: key.to_owned(),
|
||||
title: format!("{} {title}", if visible { "●" } else { "○" }),
|
||||
detail: Some(if visible { "Shown" } else { "Hidden" }.to_owned()),
|
||||
detail: None,
|
||||
leading: None,
|
||||
badge: None,
|
||||
active: visible,
|
||||
|
||||
Reference in new issue
Block a user