mirror of
https://git.aramjonghu.dev/AramJonghu/rustlings.git
synced 2026-09-05 01:33:30 +02:00
Fix contrast in terminals with a light theme
This commit is contained in:
+5
-3
@@ -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)?;
|
||||
|
||||
Reference in New Issue
Block a user