mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-06 18:46:49 +00:00
Use ButtonLike
for breadcrumb (#3452)
This PR updates the (placeholder) breadcrumb to use the new `ButtonLike` component. Eventually this will need custom styling (e.g., syntax highlighting for the symbol children), which is why we're using a `ButtonLike` as opposed to a regular `Button`. Release Notes: - N/A
This commit is contained in:
parent
9d53287341
commit
bda1dc7721
1 changed files with 9 additions and 8 deletions
|
@ -4,7 +4,7 @@ use gpui::{
|
||||||
ViewContext, WindowContext,
|
ViewContext, WindowContext,
|
||||||
};
|
};
|
||||||
use ui::prelude::*;
|
use ui::prelude::*;
|
||||||
use ui::{h_stack, v_stack, Button, Color, Icon, IconButton, Label};
|
use ui::{h_stack, v_stack, ButtonLike, Color, Icon, IconButton, Label};
|
||||||
|
|
||||||
pub enum ToolbarItemEvent {
|
pub enum ToolbarItemEvent {
|
||||||
ChangeLocation(ToolbarItemLocation),
|
ChangeLocation(ToolbarItemLocation),
|
||||||
|
@ -90,13 +90,14 @@ impl Render for Toolbar {
|
||||||
.justify_between()
|
.justify_between()
|
||||||
.child(
|
.child(
|
||||||
// Toolbar left side
|
// Toolbar left side
|
||||||
h_stack()
|
h_stack().border().border_color(gpui::red()).p_1().child(
|
||||||
.border()
|
ButtonLike::new("breadcrumb")
|
||||||
.border_color(gpui::red())
|
.child(Label::new("crates/workspace2/src/toolbar.rs"))
|
||||||
.p_1()
|
.child(Label::new("›").color(Color::Muted))
|
||||||
.child(Button::new("breadcrumb_crates", "crates"))
|
.child(Label::new("impl Render for Toolbar"))
|
||||||
.child(Label::new("/").color(Color::Muted))
|
.child(Label::new("›").color(Color::Muted))
|
||||||
.child(Button::new("breadcrumb_workspace2", "workspace2")),
|
.child(Label::new("fn render")),
|
||||||
|
),
|
||||||
)
|
)
|
||||||
// Toolbar right side
|
// Toolbar right side
|
||||||
.child(
|
.child(
|
||||||
|
|
Loading…
Reference in a new issue