Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
outline_panel: Fix inconsistent keybinding label casing (#54307)
galuis11611b8980dc1c5
diff --git a/crates/outline_panel/src/outline_panel.rs b/crates/outline_panel/src/outline_panel.rsindex b4a077b1e82..0a423f7e547 100644--- a/crates/outline_panel/src/outline_panel.rs+++ b/crates/outline_panel/src/outline_panel.rs@@ -51,7 +51,8 @@ use theme::SyntaxTheme;use theme_settings::ThemeSettings;use ui::{ContextMenu, FluentBuilder, HighlightedLabel, IconButton, IconButtonShape, IndentGuideColors,- IndentGuideLayout, ListItem, ScrollAxes, Scrollbars, Tab, Tooltip, WithScrollbar, prelude::*,+ IndentGuideLayout, KeyBinding, ListItem, ScrollAxes, Scrollbars, Tab, Tooltip, WithScrollbar,+ prelude::*,};use util::{RangeExt, ResultExt, TryFutureExt, debug_panic, rel_path::RelPath};use workspace::{@@ -4561,18 +4562,30 @@ impl OutlinePanel {.child(Label::new(query)),)})- .child(h_flex().justify_center().child({- let keystroke = match self.position(window, cx) {- DockPosition::Left => window.keystroke_text_for(&workspace::ToggleLeftDock),- DockPosition::Bottom => {- window.keystroke_text_for(&workspace::ToggleBottomDock)- }- DockPosition::Right => {- window.keystroke_text_for(&workspace::ToggleRightDock)- }- };- Label::new(format!("Toggle Panel With {keystroke}")).color(Color::Muted)- }))+ .child(+ h_flex()+ .gap_1()+ .justify_center()+ .child(Label::new("Toggle Panel With").color(Color::Muted))+ .child({+ let key_binding = match self.position(window, cx) {+ DockPosition::Left => {+ KeyBinding::for_action(&workspace::ToggleLeftDock, cx)+ .into_any_element()+ }+ DockPosition::Bottom => {+ KeyBinding::for_action(&workspace::ToggleBottomDock, cx)+ .into_any_element()+ }+ DockPosition::Right => {+ KeyBinding::for_action(&workspace::ToggleRightDock, cx)+ .into_any_element()+ }+ };++ key_binding+ }),+ )} else {let list_contents = {let items_len = self.cached_entries.len();