Skip to content

Commit 71fdf1d

Browse files
author
Stephan Dilly
committed
better tag highlighting in log
1 parent 5bfdb40 commit 71fdf1d

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99
### Changed
1010
- 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))
1111
- `arrow-up`/`down` on bottom/top of status file list switches focus ([#105](https://github.com/extrawurst/gitui/issues/105))
12+
- highlight tags in revlog better
1213

1314
### Added
1415
- New `Stage all [a]`/`Unstage all [a]` in changes lists ([#82](https://github.com/extrawurst/gitui/issues/82))

src/components/commitlist.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ impl CommitList {
211211
} else {
212212
String::from("")
213213
}),
214-
theme.tab(true).bg(theme.text(true, selected).bg),
214+
theme.tags(selected),
215215
));
216216

217217
txt.push(splitter);

src/ui/style.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,17 @@ impl Theme {
7272
}
7373
}
7474

75+
pub fn tags(&self, selected: bool) -> Style {
76+
Style::default()
77+
.fg(self.selected_tab)
78+
.modifier(Modifier::BOLD)
79+
.bg(if selected {
80+
self.selection_bg
81+
} else {
82+
Color::Reset
83+
})
84+
}
85+
7586
pub fn text(&self, enabled: bool, selected: bool) -> Style {
7687
match (enabled, selected) {
7788
(false, _) => Style::default().fg(self.disabled_fg),

0 commit comments

Comments
 (0)