diff options
author | Alexandru Macovei <alexnmaco@gmail.com> | 2022-10-18 14:37:20 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-18 13:37:20 +0200 |
commit | 216fad3140d5923ef78b2e4484e35f57326b6eaf (patch) | |
tree | 8504cbe7f90aae601be48bc6cffbc22a2518b795 /src/ui | |
parent | 8604b331ae185e7a21aca29fed00729e0e7dbd4b (diff) |
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
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/style.rs | 15 |
1 files changed, 8 insertions, 7 deletions
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, } } } |