Fix code actions menu item font size (#37951)

Follow up to https://github.com/zed-industries/zed/pull/37824, which
made items be cut-off in the _editor_ instance of the code actions menu.
This PR applies the default UI font size for the code action menu items
only when the origin is the quick actions bar.

Release Notes:

- Fix code actions menu items being cut-off in the editor.
This commit is contained in:
Danilo Leal
2025-09-10 20:16:51 -03:00
committed by GitHub
parent 0f9232a10d
commit 816c4817d0
+3 -1
View File
@@ -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", ""),