Show keystrokes as uppercase

This commit is contained in:
Antonio Scandurra 2022-05-30 12:23:03 +02:00
parent 63900612b0
commit 6c145b2abc
2 changed files with 10 additions and 4 deletions

View file

@ -352,6 +352,9 @@
"bindings": {
"left": "project_panel::CollapseSelectedEntry",
"right": "project_panel::ExpandSelectedEntry",
"cmd-x": "project_panel::Cut",
"cmd-c": "project_panel::Copy",
"cmd-v": "project_panel::Paste",
"cmd-alt-c": "project_panel::CopyPath",
"f2": "project_panel::Rename",
"backspace": "project_panel::Delete"

View file

@ -40,7 +40,10 @@ impl Element for KeystrokeLabel {
let mut element = if let Some(keystrokes) = cx.keystrokes_for_action(self.action.as_ref()) {
Flex::row()
.with_children(keystrokes.iter().map(|keystroke| {
Label::new(keystroke.to_string(), self.text_style.clone())
Label::new(
keystroke.to_string().to_uppercase(),
self.text_style.clone(),
)
.contained()
.with_style(self.container_style)
.boxed()