mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-28 20:01:33 +00:00
Remove stacks from branch list header
Co-authored-by: Antonio <antonio@zed.dev>
This commit is contained in:
parent
48371ab8b2
commit
64b77bfa8d
1 changed files with 5 additions and 24 deletions
|
@ -217,25 +217,13 @@ impl PickerDelegate for BranchListDelegate {
|
||||||
let theme = &theme::current(cx);
|
let theme = &theme::current(cx);
|
||||||
let style = theme.picker.header.clone();
|
let style = theme.picker.header.clone();
|
||||||
let label = if self.last_query.is_empty() {
|
let label = if self.last_query.is_empty() {
|
||||||
Stack::new()
|
Flex::row()
|
||||||
.with_child(
|
.with_child(Label::new("Recent branches", style.label.clone()))
|
||||||
Flex::row()
|
|
||||||
.with_child(Label::new("Recent branches", style.label.clone()))
|
|
||||||
.contained()
|
|
||||||
.with_style(style.container)
|
|
||||||
.into_any(),
|
|
||||||
)
|
|
||||||
.contained()
|
.contained()
|
||||||
.with_style(style.container)
|
.with_style(style.container)
|
||||||
.into_any()
|
|
||||||
} else {
|
} else {
|
||||||
Stack::new()
|
Flex::row()
|
||||||
.with_child(
|
.with_child(Label::new("Branches", style.label.clone()).aligned().left())
|
||||||
Flex::row()
|
|
||||||
.with_child(Label::new("Branches", style.label.clone()).aligned().left())
|
|
||||||
.contained()
|
|
||||||
.with_style(style.container),
|
|
||||||
)
|
|
||||||
.with_children(self.matches.is_empty().not().then(|| {
|
.with_children(self.matches.is_empty().not().then(|| {
|
||||||
let suffix = if self.matches.len() == 1 { "" } else { "es" };
|
let suffix = if self.matches.len() == 1 { "" } else { "es" };
|
||||||
Flex::row()
|
Flex::row()
|
||||||
|
@ -249,14 +237,7 @@ impl PickerDelegate for BranchListDelegate {
|
||||||
}))
|
}))
|
||||||
.contained()
|
.contained()
|
||||||
.with_style(style.container)
|
.with_style(style.container)
|
||||||
.constrained()
|
|
||||||
.into_any()
|
|
||||||
};
|
};
|
||||||
Some(
|
Some(label.into_any())
|
||||||
MouseEventHandler::<BranchList, _>::new(0, cx, move |_, _| label)
|
|
||||||
.on_click(MouseButton::Left, move |_, _, _| {})
|
|
||||||
.on_down_out(MouseButton::Left, move |_, _, _| {})
|
|
||||||
.into_any(),
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue