edit predictions: Make Zed bar at least as wide as menu (#24206)
Release Notes: - N/A --------- Co-authored-by: Ben <ben@zed.dev>
This commit is contained in:
parent
9b031d747f
commit
4f98157e64
2 changed files with 14 additions and 3 deletions
|
@ -5415,6 +5415,7 @@ impl Editor {
|
|||
#[allow(clippy::too_many_arguments)]
|
||||
fn render_edit_prediction_cursor_popover(
|
||||
&self,
|
||||
min_width: Pixels,
|
||||
max_width: Pixels,
|
||||
cursor_point: Point,
|
||||
line_layouts: &[LineWithInvisibles],
|
||||
|
@ -5429,6 +5430,7 @@ impl Editor {
|
|||
return Some(
|
||||
h_flex()
|
||||
.h(self.edit_prediction_cursor_popover_height())
|
||||
.min_w(min_width)
|
||||
.flex_1()
|
||||
.px_2()
|
||||
.gap_3()
|
||||
|
@ -5458,7 +5460,10 @@ impl Editor {
|
|||
let is_refreshing = provider.provider.is_refreshing(cx);
|
||||
|
||||
fn pending_completion_container() -> Div {
|
||||
h_flex().gap_3().child(Icon::new(IconName::ZedPredict))
|
||||
h_flex()
|
||||
.flex_1()
|
||||
.gap_3()
|
||||
.child(Icon::new(IconName::ZedPredict))
|
||||
}
|
||||
|
||||
let completion = match &self.active_inline_completion {
|
||||
|
@ -5509,13 +5514,13 @@ impl Editor {
|
|||
Some(
|
||||
h_flex()
|
||||
.h(self.edit_prediction_cursor_popover_height())
|
||||
.min_w(min_width)
|
||||
.max_w(max_width)
|
||||
.flex_1()
|
||||
.px_2()
|
||||
.gap_3()
|
||||
.elevation_2(cx)
|
||||
.child(completion)
|
||||
.child(div().w_full())
|
||||
.child(
|
||||
h_flex()
|
||||
.border_l_1()
|
||||
|
@ -5648,7 +5653,7 @@ impl Editor {
|
|||
Icon::new(IconName::ZedPredict).into_any_element()
|
||||
};
|
||||
|
||||
Some(h_flex().gap_3().child(left).child(preview))
|
||||
Some(h_flex().flex_1().gap_3().child(left).child(preview))
|
||||
}
|
||||
|
||||
InlineCompletion::Move {
|
||||
|
@ -5681,6 +5686,7 @@ impl Editor {
|
|||
Some(
|
||||
h_flex()
|
||||
.gap_3()
|
||||
.flex_1()
|
||||
.child(render_relative_row_jump(
|
||||
"Jump ",
|
||||
cursor_point.row,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue