WIP
This commit is contained in:
parent
4cb13fb39c
commit
25ad635577
6 changed files with 47 additions and 53 deletions
|
@ -54,10 +54,22 @@ impl View for Breadcrumbs {
|
|||
let breadcrumbs = match active_item.breadcrumbs(&theme, cx) {
|
||||
Some(breadcrumbs) => breadcrumbs,
|
||||
None => return Empty::new().boxed(),
|
||||
};
|
||||
}
|
||||
.into_iter()
|
||||
.map(|breadcrumb| {
|
||||
let text = Text::new(
|
||||
breadcrumb.text,
|
||||
theme.workspace.breadcrumbs.default.text.clone(),
|
||||
);
|
||||
if let Some(highlights) = breadcrumb.highlights {
|
||||
text.with_highlights(highlights).boxed()
|
||||
} else {
|
||||
text.boxed()
|
||||
}
|
||||
});
|
||||
|
||||
let crumbs = Flex::row()
|
||||
.with_children(Itertools::intersperse_with(breadcrumbs.into_iter(), || {
|
||||
.with_children(Itertools::intersperse_with(breadcrumbs, || {
|
||||
Label::new(" 〉 ", style.default.text.clone()).boxed()
|
||||
}))
|
||||
.constrained()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue