Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Fix code actions menu item font size (#37951)

Danilo Leal816c4817d000
diff --git a/crates/editor/src/code_context_menus.rs b/crates/editor/src/code_context_menus.rs
index eef4e864392..9384e2efed1 100644
--- a/crates/editor/src/code_context_menus.rs
+++ b/crates/editor/src/code_context_menus.rs
@@ -1481,6 +1481,8 @@ impl CodeActionsMenu {
) -> AnyElement {
let actions = self.actions.clone();
let selected_item = self.selected_item;
+ let is_quick_action_bar = matches!(self.origin(), ContextMenuOrigin::QuickActionBar);
+
let list = uniform_list(
"code_actions_menu",
self.actions.len(),
@@ -1502,7 +1504,7 @@ impl CodeActionsMenu {
this.child(
h_flex()
.overflow_hidden()
- .text_sm()
+ .when(is_quick_action_bar, |this| this.text_ui(cx))
.child(
// TASK: It would be good to make lsp_action.title a SharedString to avoid allocating here.
action.lsp_action.title().replace("\n", ""),