
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>
33 lines
815 B
Rust
33 lines
815 B
Rust
use crate::prelude::*;
|
|
use crate::{theme, Breadcrumb, Icon, IconButton};
|
|
|
|
#[derive(Clone)]
|
|
pub struct ToolbarItem {}
|
|
|
|
#[derive(Element, Clone)]
|
|
pub struct Toolbar {
|
|
items: Vec<ToolbarItem>,
|
|
}
|
|
|
|
impl Toolbar {
|
|
pub fn new() -> Self {
|
|
Self { items: Vec::new() }
|
|
}
|
|
|
|
fn render<V: 'static>(&mut self, _: &mut V, cx: &mut ViewContext<V>) -> impl IntoElement<V> {
|
|
let theme = theme(cx);
|
|
|
|
div()
|
|
.p_2()
|
|
.flex()
|
|
.justify_between()
|
|
.child(Breadcrumb::new())
|
|
.child(
|
|
div()
|
|
.flex()
|
|
.child(IconButton::new(Icon::InlayHint))
|
|
.child(IconButton::new(Icon::MagnifyingGlass))
|
|
.child(IconButton::new(Icon::MagicWand)),
|
|
)
|
|
}
|
|
}
|