diff options
| author | mo8it <mo8it@proton.me> | 2024-11-11 14:34:33 +0100 |
|---|---|---|
| committer | mo8it <mo8it@proton.me> | 2024-11-11 14:34:33 +0100 |
| commit | 46ad25f9257836d4d1303874f0a618b6c319b263 (patch) | |
| tree | 40ff3b4e589e9d538c99ea559db7811d56e1b303 /src/watch | |
| parent | 2a725fb13719de0597a34c633cb59da7c7244534 (diff) | |
Fix contrast in terminals with a light theme
Diffstat (limited to 'src/watch')
| -rw-r--r-- | src/watch/state.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/watch/state.rs b/src/watch/state.rs index 47978ab..c27dedf 100644 --- a/src/watch/state.rs +++ b/src/watch/state.rs @@ -20,6 +20,10 @@ use crate::{ use super::{terminal_event::terminal_event_handler, InputPauseGuard, WatchEvent}; +const HEADING_ATTRIBUTES: Attributes = Attributes::none() + .with(Attribute::Bold) + .with(Attribute::Underlined); + #[derive(PartialEq, Eq)] enum DoneStatus { DoneWithSolution(String), @@ -209,9 +213,7 @@ impl<'a> WatchState<'a> { if self.show_hint { stdout - .queue(SetAttributes( - Attributes::from(Attribute::Bold).with(Attribute::Underlined), - ))? + .queue(SetAttributes(HEADING_ATTRIBUTES))? .queue(SetForegroundColor(Color::Cyan))?; stdout.write_all(b"Hint")?; stdout.queue(ResetColor)?; |
