From 74bdb483591d040abc8cd7ed816a4caef98a12ad Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Tue, 23 Jan 2024 21:26:40 +0200 Subject: [PATCH] Make completions menu to occupy more space * make completion elements as wide as the longest element * make completion docs scrollable co-authored-by: Piotr --- crates/editor/src/editor.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index 4be449f3cd..c01a83dda8 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -848,7 +848,7 @@ impl CompletionsMenu { .flex_1() .px_1p5() .py_1() - .min_w(px(260.)) + .min_w(px(160.)) .max_w(px(640.)) .w(px(500.)) .overflow_y_scroll() @@ -910,7 +910,7 @@ impl CompletionsMenu { None }; - div().min_w(px(220.)).max_w(px(540.)).child( + h_flex().flex_grow().min_w(px(120.)).child( ListItem::new(mat.candidate_id) .inset(true) .selected(item_ix == selected_item) @@ -925,7 +925,7 @@ impl CompletionsMenu { ) .map(|task| task.detach_and_log_err(cx)); })) - .child(h_flex().overflow_hidden().child(completion_label)) + .child(h_flex().flex_grow().child(completion_label)) .end_slot::
(documentation_label), ) })