Skip to content

selected items should have dedicated fg color #1366

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 30, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -14,10 +14,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
* submodules support ([#1087](https://github.com/extrawurst/gitui/issues/1087))
* remember tab between app starts ([#1338](https://github.com/extrawurst/gitui/issues/1338))
* repo specific gitui options saved in `.git/gitui.ron` ([#1340](https://github.com/extrawurst/gitui/issues/1340))
* commit msg history ([#1345](https://github.com/extrawurst/gitui/issues/1345))
* customizable `cmdbar_bg` theme color & screen spanning selected line bg [[@gigitsu](https://github.com/gigitsu)] ([#1299](https://github.com/extrawurst/gitui/pull/1299))
* word motions to text input [[@Rodrigodd](https://github.com/Rodrigodd)] ([#1256](https://github.com/extrawurst/gitui/issues/1256))
* file blame at right revision from commit-details [[@heiskane](https://github.com/heiskane)] ([#1122](https://github.com/extrawurst/gitui/issues/1122))
* dedicated selection foreground theme color `selection_fg` ([#1365](https://github.com/extrawurst/gitui/issues/1365))
* add `regex-fancy` and `regex-onig` features to allow building Syntect with Onigumara regex engine instead of the default engine based on fancy-regex [[@jirutka](https://github.com/jirutka)]
* add `vendor-openssl` feature to allow building without vendored openssl [[@jirutka](https://github.com/jirutka)]
* allow copying marked commits [[@remique](https://github.com/remique)] ([#1288](https://github.com/extrawurst/gitui/issues/1288))
4 changes: 3 additions & 1 deletion src/ui/style.rs
Original file line number Diff line number Diff line change
@@ -20,6 +20,7 @@ pub struct Theme {
selected_tab: Color,
command_fg: Color,
selection_bg: Color,
selection_fg: Color,
cmdbar_bg: Color,
cmdbar_extra_lines_bg: Color,
disabled_fg: Color,
@@ -147,7 +148,7 @@ impl Theme {

fn apply_select(&self, style: Style, selected: bool) -> Style {
if selected {
style.bg(self.selection_bg)
style.bg(self.selection_bg).fg(self.selection_fg)
} else {
style
}
@@ -308,6 +309,7 @@ impl Default for Theme {
selected_tab: Color::Reset,
command_fg: Color::White,
selection_bg: Color::Blue,
selection_fg: Color::White,
cmdbar_bg: Color::Blue,
cmdbar_extra_lines_bg: Color::Blue,
disabled_fg: Color::DarkGray,