diff options
author | Stephan Dilly <dilly.stephan@gmail.com> | 2021-08-17 14:51:27 +0200 |
---|---|---|
committer | Stephan Dilly <dilly.stephan@gmail.com> | 2021-08-17 14:51:27 +0200 |
commit | 3847ec92cff441356ba33f16950fff34d09f7b75 (patch) | |
tree | 6a6b4a46af409f9728c015ee6abc984be138d4db | |
parent | dad8e8d43de79a3c39a37f118e529dc88fab5495 (diff) |
distinct marked commits styling
-rw-r--r-- | src/components/commitlist.rs | 4 | ||||
-rw-r--r-- | src/ui/style.rs | 9 |
2 files changed, 11 insertions, 2 deletions
diff --git a/src/components/commitlist.rs b/src/components/commitlist.rs index 04a57f2e..73dd0389 100644 --- a/src/components/commitlist.rs +++ b/src/components/commitlist.rs @@ -227,11 +227,11 @@ impl CommitList { let splitter = Span::styled(splitter_txt, theme.text(true, selected)); - // marked + // marker if let Some(marked) = marked { txt.push(Span::styled( Cow::from(if marked { "X" } else { " " }), - theme.text(true, selected), + theme.log_marker(selected), )); txt.push(splitter.clone()); } diff --git a/src/ui/style.rs b/src/ui/style.rs index 772cba05..0d8280f1 100644 --- a/src/ui/style.rs +++ b/src/ui/style.rs @@ -230,6 +230,15 @@ impl Theme { selected, ) } + + pub fn log_marker(&self, selected: bool) -> Style { + let mut style = Style::default().add_modifier(Modifier::BOLD); + + style = self.apply_select(style, selected); + + style + } + pub fn commit_time(&self, selected: bool) -> Style { self.apply_select( Style::default().fg(self.commit_time), |