Unbreak toolbar layout & improve disabling ButtonLike
This commit is contained in:
@@ -80,7 +80,6 @@ impl Render for Toolbar {
|
||||
type Element = Div;
|
||||
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> Self::Element {
|
||||
//dbg!(&self.items.len());
|
||||
v_stack()
|
||||
.border_b()
|
||||
.border_color(cx.theme().colors().border_variant)
|
||||
@@ -88,17 +87,8 @@ impl Render for Toolbar {
|
||||
.child(
|
||||
h_stack()
|
||||
.justify_between()
|
||||
.child(
|
||||
// Toolbar left side
|
||||
h_stack().border().border_color(gpui::red()).p_1().child(
|
||||
ButtonLike::new("breadcrumb")
|
||||
.child(Label::new("crates/workspace2/src/toolbar.rs"))
|
||||
.child(Label::new("›").color(Color::Muted))
|
||||
.child(Label::new("impl Render for Toolbar"))
|
||||
.child(Label::new("›").color(Color::Muted))
|
||||
.child(Label::new("fn render")),
|
||||
),
|
||||
)
|
||||
// Toolbar left side
|
||||
.children(self.items.iter().map(|(child, _)| child.to_any()))
|
||||
// Toolbar right side
|
||||
.child(
|
||||
h_stack()
|
||||
@@ -117,7 +107,6 @@ impl Render for Toolbar {
|
||||
),
|
||||
),
|
||||
)
|
||||
.children(self.items.iter().map(|(child, _)| child.to_any()))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user