From 216fad3140d5923ef78b2e4484e35f57326b6eaf Mon Sep 17 00:00:00 2001 From: Alexandru Macovei Date: Tue, 18 Oct 2022 14:37:20 +0300 Subject: Display tags and branches in the revlog (#1371) * give tags a more distinctive appearance in the revlog * store branches on commitlist, and display branch labels on head commits --- src/ui/style.rs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/ui') diff --git a/src/ui/style.rs b/src/ui/style.rs index d66ff16b..8fca7e77 100644 --- a/src/ui/style.rs +++ b/src/ui/style.rs @@ -36,6 +36,8 @@ pub struct Theme { danger_fg: Color, push_gauge_bg: Color, push_gauge_fg: Color, + tag_fg: Color, + branch_fg: Color, } impl Theme { @@ -64,14 +66,11 @@ impl Theme { Style::default().add_modifier(Modifier::BOLD) } else { Style::default() - }; + } + .fg(self.branch_fg); if selected { - branch.patch( - Style::default() - .fg(self.command_fg) - .bg(self.selection_bg), - ) + branch.patch(Style::default().bg(self.selection_bg)) } else { branch } @@ -89,7 +88,7 @@ impl Theme { pub fn tags(&self, selected: bool) -> Style { Style::default() - .fg(self.selected_tab) + .fg(self.tag_fg) .add_modifier(Modifier::BOLD) .bg(if selected { self.selection_bg @@ -325,6 +324,8 @@ impl Default for Theme { danger_fg: Color::Red, push_gauge_bg: Color::Blue, push_gauge_fg: Color::Reset, + tag_fg: Color::LightMagenta, + branch_fg: Color::LightYellow, } } } -- cgit v1.2.3