This PR mainlines the current state of new GPUI2-based UI from the `gpui2-ui` branch. Release Notes: - N/A --------- Co-authored-by: Nate Butler <iamnbutler@gmail.com> Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com> Co-authored-by: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com> Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Co-authored-by: Nate <nate@zed.dev> Co-authored-by: Mikayla <mikayla@zed.dev>
32 lines
864 B
Rust
32 lines
864 B
Rust
use crate::prelude::*;
|
||
use crate::{h_stack, theme};
|
||
|
||
#[derive(Element)]
|
||
pub struct Breadcrumb {}
|
||
|
||
impl Breadcrumb {
|
||
pub fn new() -> Self {
|
||
Self {}
|
||
}
|
||
|
||
fn render<V: 'static>(&mut self, _: &mut V, cx: &mut ViewContext<V>) -> impl IntoElement<V> {
|
||
let theme = theme(cx);
|
||
|
||
h_stack()
|
||
.px_1()
|
||
// TODO: Read font from theme (or settings?).
|
||
.font("Zed Mono Extended")
|
||
.text_sm()
|
||
.text_color(theme.middle.base.default.foreground)
|
||
.rounded_md()
|
||
.hover()
|
||
.fill(theme.highest.base.hovered.background)
|
||
// TODO: Replace hardcoded breadcrumbs.
|
||
.child("crates/ui/src/components/toolbar.rs")
|
||
.child(" › ")
|
||
.child("impl Breadcrumb")
|
||
.child(" › ")
|
||
.child("fn render")
|
||
}
|
||
}
|