better tag highlighting in log

This commit is contained in:
Stephan Dilly 2020-06-06 19:33:52 +02:00
parent 5bfdb40a14
commit 71fdf1d6a9
3 changed files with 13 additions and 1 deletions

View File

@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed ### Changed
- changed hotkeys for selecting stage/workdir (**Note:** use `[w]`/`[s]` to change between workdir and stage) and added hotkeys (`[1234]`) to switch to tabs directly ([#92](https://github.com/extrawurst/gitui/issues/92)) - changed hotkeys for selecting stage/workdir (**Note:** use `[w]`/`[s]` to change between workdir and stage) and added hotkeys (`[1234]`) to switch to tabs directly ([#92](https://github.com/extrawurst/gitui/issues/92))
- `arrow-up`/`down` on bottom/top of status file list switches focus ([#105](https://github.com/extrawurst/gitui/issues/105)) - `arrow-up`/`down` on bottom/top of status file list switches focus ([#105](https://github.com/extrawurst/gitui/issues/105))
- highlight tags in revlog better
### Added ### Added
- New `Stage all [a]`/`Unstage all [a]` in changes lists ([#82](https://github.com/extrawurst/gitui/issues/82)) - New `Stage all [a]`/`Unstage all [a]` in changes lists ([#82](https://github.com/extrawurst/gitui/issues/82))

View File

@ -211,7 +211,7 @@ impl CommitList {
} else { } else {
String::from("") String::from("")
}), }),
theme.tab(true).bg(theme.text(true, selected).bg), theme.tags(selected),
)); ));
txt.push(splitter); txt.push(splitter);

View File

@ -72,6 +72,17 @@ impl Theme {
} }
} }
pub fn tags(&self, selected: bool) -> Style {
Style::default()
.fg(self.selected_tab)
.modifier(Modifier::BOLD)
.bg(if selected {
self.selection_bg
} else {
Color::Reset
})
}
pub fn text(&self, enabled: bool, selected: bool) -> Style { pub fn text(&self, enabled: bool, selected: bool) -> Style {
match (enabled, selected) { match (enabled, selected) {
(false, _) => Style::default().fg(self.disabled_fg), (false, _) => Style::default().fg(self.disabled_fg),