diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c7d66c1c9..4e0f82ec2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ These defaults require some adoption from existing users but feel more natural t * add confirmation for dialog for undo commit [[@TeFiLeDo](https://github.com/TeFiLeDo)] ([#1912](https://github.com/extrawurst/gitui/issues/1912)) * support `prepare-commit-msg` hook ([#1873](https://github.com/extrawurst/gitui/issues/1873)) * support for new-line in text-input (e.g. commit message editor) [[@pm100]](https://github/pm100) ([#1662](https://github.com/extrawurst/gitui/issues/1662)). +* new style `block_title_focused` to allow customizing title text of focused frame/block ([#2052](https://github.com/extrawurst/gitui/issues/2052)). ### Changed * do not allow tagging when `tag.gpgsign` enabled until gpg-signing is [supported](https://github.com/extrawurst/gitui/issues/97) [[@TeFiLeDo](https://github.com/TeFiLeDo)] ([#1915](https://github.com/extrawurst/gitui/pull/1915)) diff --git a/src/app.rs b/src/app.rs index 6fdfc42460..76c5b3c21b 100644 --- a/src/app.rs +++ b/src/app.rs @@ -1132,7 +1132,7 @@ impl App { &self.repo_path_text, text_area.width as usize, ), - self.theme.title(true), + self.theme.title(false), )])) .alignment(Alignment::Right), text_area, diff --git a/src/ui/style.rs b/src/ui/style.rs index c54350d745..7310721f56 100644 --- a/src/ui/style.rs +++ b/src/ui/style.rs @@ -33,6 +33,7 @@ pub struct Theme { tag_fg: Color, branch_fg: Color, line_break: String, + block_title_focused: Color, } impl Theme { @@ -50,7 +51,9 @@ impl Theme { pub fn title(&self, focused: bool) -> Style { if focused { - Style::default().add_modifier(Modifier::BOLD) + Style::default() + .fg(self.block_title_focused) + .add_modifier(Modifier::BOLD) } else { Style::default().fg(self.disabled_fg) } @@ -342,6 +345,7 @@ impl Default for Theme { tag_fg: Color::LightMagenta, branch_fg: Color::LightYellow, line_break: "ΒΆ".to_string(), + block_title_focused: Color::Reset, } } }