From 2b09872131415128ff33cd1f63408935f9587f3d Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 31 Aug 2024 19:20:50 +0100 Subject: [PATCH] feat(tui): branch names look more like 'pills' Use round brackets --- crates/cli/src/tui/components/history.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/crates/cli/src/tui/components/history.rs b/crates/cli/src/tui/components/history.rs index 1287ddd..58d9a40 100644 --- a/crates/cli/src/tui/components/history.rs +++ b/crates/cli/src/tui/components/history.rs @@ -1,3 +1,4 @@ +use color_eyre::owo_colors::OwoColorize; // use git_next_core::git::graph::Log; use lazy_static::lazy_static; @@ -84,12 +85,10 @@ impl From for Line<'_> { branches.sort(); branches .into_iter() - .map(|branch| Span::from(branch).style(Style::default().fg(Color::Blue))) - .for_each(|span| { - spans.push("[".into()); - spans.push(span); - spans.push("]".into()); - }); + .map(|branch| format!("({branch})")) + .map(Span::from) + .map(|span| span.style(Style::default().fg(Color::White).bg(Color::Blue))) + .for_each(|span| spans.push(span)); spans.push(" ".into()); spans.push(message.into()); Line::from(spans)