Revert "Improve completion, action and shared project popovers' layout"
This commit is contained in:
parent
b20b1d446f
commit
9f6072c6b6
5 changed files with 11 additions and 44 deletions
|
@ -848,7 +848,7 @@ impl CompletionsMenu {
|
|||
.flex_1()
|
||||
.px_1p5()
|
||||
.py_1()
|
||||
.min_w(px(160.))
|
||||
.min_w(px(260.))
|
||||
.max_w(px(640.))
|
||||
.w(px(500.))
|
||||
.overflow_y_scroll()
|
||||
|
@ -910,7 +910,7 @@ impl CompletionsMenu {
|
|||
None
|
||||
};
|
||||
|
||||
h_flex().flex_grow().w_full().min_w(px(120.)).child(
|
||||
div().min_w(px(220.)).max_w(px(540.)).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().flex_grow().child(completion_label))
|
||||
.child(h_flex().overflow_hidden().child(completion_label))
|
||||
.end_slot::<Div>(documentation_label),
|
||||
)
|
||||
})
|
||||
|
@ -934,9 +934,7 @@ impl CompletionsMenu {
|
|||
)
|
||||
.max_h(max_height)
|
||||
.track_scroll(self.scroll_handle.clone())
|
||||
.with_width_from_item(widest_completion_ix)
|
||||
.use_max_height()
|
||||
.use_max_width();
|
||||
.with_width_from_item(widest_completion_ix);
|
||||
|
||||
Popover::new()
|
||||
.child(list)
|
||||
|
@ -1078,11 +1076,8 @@ impl CodeActionsMenu {
|
|||
let item_ix = range.start + ix;
|
||||
let selected = selected_item == item_ix;
|
||||
let colors = cx.theme().colors();
|
||||
h_flex()
|
||||
.flex_grow()
|
||||
.w_full()
|
||||
div()
|
||||
.px_2()
|
||||
.min_w(px(120.))
|
||||
.text_color(colors.text)
|
||||
.when(selected, |style| {
|
||||
style
|
||||
|
@ -1126,8 +1121,6 @@ impl CodeActionsMenu {
|
|||
.max_by_key(|(_, action)| action.lsp_action.title.chars().count())
|
||||
.map(|(ix, _)| ix),
|
||||
)
|
||||
.use_max_width()
|
||||
.use_max_height()
|
||||
.into_any_element();
|
||||
|
||||
if self.deployed_from_indicator {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue