mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-07 17:26:56 +00:00
Clip completion labels when they would otherwise overflow their container
Co-Authored-By: Julia <julia@zed.dev>
This commit is contained in:
parent
f4f9aab8a9
commit
231fd1c5c0
2 changed files with 4 additions and 1 deletions
|
@ -1266,7 +1266,7 @@ impl CompletionsMenu {
|
|||
)
|
||||
.map(|task| task.detach_and_log_err(cx));
|
||||
}))
|
||||
.child(completion_label)
|
||||
.child(h_stack().overflow_hidden().child(completion_label))
|
||||
.end_slot::<Div>(documentation_label),
|
||||
)
|
||||
})
|
||||
|
|
|
@ -224,6 +224,9 @@ impl RenderOnce for ListItem {
|
|||
}))
|
||||
.child(
|
||||
h_stack()
|
||||
// HACK: We need to set *any* width value here in order for this container to size correctly.
|
||||
// Without this the `h_stack` will overflow the parent `inner_list_item`.
|
||||
.w_px()
|
||||
.flex_1()
|
||||
.gap_1()
|
||||
.children(self.start_slot)
|
||||
|
|
Loading…
Reference in a new issue