distinct marked commits styling

This commit is contained in:
Stephan Dilly 2021-08-17 14:51:27 +02:00
parent dad8e8d43d
commit 3847ec92cf
2 changed files with 11 additions and 2 deletions

View file

@ -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());
}

View file

@ -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),