mirror of
https://github.com/gitui-org/gitui
synced 2026-05-23 08:58:21 +00:00
distinct marked commits styling
This commit is contained in:
parent
dad8e8d43d
commit
3847ec92cf
2 changed files with 11 additions and 2 deletions
|
|
@ -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());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
|
|
|
|||
Loading…
Reference in a new issue