From 8b848484d2eb8845550756f2b781095254c971ce Mon Sep 17 00:00:00 2001 From: extrawurst Date: Fri, 30 Sep 2022 13:19:58 +0200 Subject: [PATCH 1/2] selected items should have dedicated fg color --- src/ui/style.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ui/style.rs b/src/ui/style.rs index 51ed90f814..d66ff16bac 100644 --- a/src/ui/style.rs +++ b/src/ui/style.rs @@ -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, From 0302d4c28a29e04287706340239c2379dc8a6645 Mon Sep 17 00:00:00 2001 From: extrawurst Date: Fri, 30 Sep 2022 20:19:11 +0200 Subject: [PATCH 2/2] changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f11631a678..fea975dc30 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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))