From ec47464bba1e77379a0f3ca7b8cb169a9300b50b Mon Sep 17 00:00:00 2001 From: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Date: Wed, 5 Jul 2023 16:56:08 +0200 Subject: [PATCH] branch_list: Show match count on the right hand side of a header. Co-authored-by: Antonio --- crates/collab_ui/src/branch_list.rs | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/crates/collab_ui/src/branch_list.rs b/crates/collab_ui/src/branch_list.rs index 229d1fdc29..16fefbd2eb 100644 --- a/crates/collab_ui/src/branch_list.rs +++ b/crates/collab_ui/src/branch_list.rs @@ -221,17 +221,14 @@ impl PickerDelegate for BranchListDelegate { .with_style(style.container) } else { Flex::row() - .with_child(Label::new("Branches", style.label.clone()).aligned().left()) + .with_child(Label::new("Branches", style.label.clone())) .with_children(self.matches.is_empty().not().then(|| { let suffix = if self.matches.len() == 1 { "" } else { "es" }; - Flex::row() - .align_children_center() - .with_child(Label::new( - format!("{} match{}", self.matches.len(), suffix), - style.label, - )) - .aligned() - .right() + Label::new( + format!("{} match{}", self.matches.len(), suffix), + style.label, + ) + .flex_float() })) .contained() .with_style(style.container)