mirror of
https://github.com/zed-industries/zed.git
synced 2026-06-01 03:14:56 +07:00
lsp_button: Fix long LSP version label (#46359)
If the LSP version label ends up being super long, we now truncate it and add a tooltip so you can see the whole thing. This avoids the submenu width from being extremely big: <img width="500" height="310" alt="Screenshot 2026-01-08 at 9 10@2x" src="https://github.com/user-attachments/assets/4729b3f8-000d-4bb5-8908-dc243a2d6e7b" /> Release Notes: - Fixed a visual bug where long LSP version labels would increase the LSP submenu width too much.
This commit is contained in:
parent
f053aeb4dd
commit
1fa9dd6284
1 changed files with 5 additions and 1 deletions
|
|
@ -489,8 +489,10 @@ impl LanguageServerState {
|
|||
let metadata_label = metadata_label.clone();
|
||||
move |_, _| {
|
||||
h_flex()
|
||||
.id("metadata-container")
|
||||
.ml_neg_1()
|
||||
.gap_1()
|
||||
.max_w_56()
|
||||
.child(
|
||||
Icon::new(IconName::Circle)
|
||||
.color(status_color)
|
||||
|
|
@ -511,8 +513,10 @@ impl LanguageServerState {
|
|||
.child(
|
||||
Label::new(metadata)
|
||||
.size(LabelSize::Small)
|
||||
.color(Color::Muted),
|
||||
.color(Color::Muted)
|
||||
.truncate(),
|
||||
)
|
||||
.tooltip(Tooltip::text(metadata.clone()))
|
||||
})
|
||||
.into_any_element()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue