Show tooltip with item paths for recent project picker items (#8987)
Before  After  Release Notes: - Fixed empty tooltip for recent projects picker items
This commit is contained in:
parent
d450fde1ed
commit
bc7fb9f253
1 changed files with 10 additions and 3 deletions
|
@ -325,14 +325,21 @@ impl PickerDelegate for RecentProjectsDelegate {
|
||||||
|
|
||||||
let highlighted_match = HighlightedMatchWithPaths {
|
let highlighted_match = HighlightedMatchWithPaths {
|
||||||
match_label: HighlightedText::join(match_labels.into_iter().flatten(), ", "),
|
match_label: HighlightedText::join(match_labels.into_iter().flatten(), ", "),
|
||||||
paths: if self.render_paths { paths } else { Vec::new() },
|
paths,
|
||||||
};
|
};
|
||||||
|
|
||||||
Some(
|
Some(
|
||||||
ListItem::new(ix)
|
ListItem::new(ix)
|
||||||
.inset(true)
|
.inset(true)
|
||||||
.spacing(ListItemSpacing::Sparse)
|
.spacing(ListItemSpacing::Sparse)
|
||||||
.selected(selected)
|
.selected(selected)
|
||||||
.child(highlighted_match.clone().render(cx))
|
.child({
|
||||||
|
let mut highlighted = highlighted_match.clone();
|
||||||
|
if !self.render_paths {
|
||||||
|
highlighted.paths.clear();
|
||||||
|
}
|
||||||
|
highlighted.render(cx)
|
||||||
|
})
|
||||||
.when(!is_current_workspace, |el| {
|
.when(!is_current_workspace, |el| {
|
||||||
let delete_button = div()
|
let delete_button = div()
|
||||||
.child(
|
.child(
|
||||||
|
@ -344,7 +351,7 @@ impl PickerDelegate for RecentProjectsDelegate {
|
||||||
|
|
||||||
this.delegate.delete_recent_project(ix, cx)
|
this.delegate.delete_recent_project(ix, cx)
|
||||||
}))
|
}))
|
||||||
.tooltip(|cx| Tooltip::text("Delete From Recent Projects...", cx)),
|
.tooltip(|cx| Tooltip::text("Delete from Recent Projects...", cx)),
|
||||||
)
|
)
|
||||||
.into_any_element();
|
.into_any_element();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue