-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Special case a few colors for Windows #36178
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -883,7 +883,11 @@ impl Destination { | |
Style::FileNameStyle | Style::LineAndColumn => {} | ||
Style::LineNumber => { | ||
try!(self.start_attr(term::Attr::Bold)); | ||
try!(self.start_attr(term::Attr::ForegroundColor(term::color::BRIGHT_BLUE))); | ||
if cfg!(windows) { | ||
try!(self.start_attr(term::Attr::ForegroundColor(term::color::BRIGHT_CYAN))); | ||
} else { | ||
try!(self.start_attr(term::Attr::ForegroundColor(term::color::BRIGHT_BLUE))); | ||
} | ||
} | ||
Style::ErrorCode => { | ||
try!(self.start_attr(term::Attr::Bold)); | ||
|
@@ -896,6 +900,9 @@ impl Destination { | |
} | ||
Style::OldSchoolNoteText | Style::HeaderMsg => { | ||
try!(self.start_attr(term::Attr::Bold)); | ||
if cfg!(windows) { | ||
try!(self.start_attr(term::Attr::ForegroundColor(term::color::BRIGHT_WHITE))); | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah... This is annoying for me since I use console with white background on Windows. These messages are completely invisible there. (Windows uses black background by default... but I'm used to seeing white background...) I guess a solution would be to detect the console setting in libterm (probably via There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you want a white background, couldn't you just invert the brightness of all the colors so the background is "black" but "black" actually means white, and "bright_white" actually means black? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK, fair. I didn't know I can do that. |
||
} | ||
Style::UnderlinePrimary | Style::LabelPrimary => { | ||
try!(self.start_attr(term::Attr::Bold)); | ||
|
@@ -904,7 +911,11 @@ impl Destination { | |
Style::UnderlineSecondary | | ||
Style::LabelSecondary => { | ||
try!(self.start_attr(term::Attr::Bold)); | ||
try!(self.start_attr(term::Attr::ForegroundColor(term::color::BRIGHT_BLUE))); | ||
if cfg!(windows) { | ||
try!(self.start_attr(term::Attr::ForegroundColor(term::color::BRIGHT_CYAN))); | ||
} else { | ||
try!(self.start_attr(term::Attr::ForegroundColor(term::color::BRIGHT_BLUE))); | ||
} | ||
} | ||
Style::NoStyle => {} | ||
Style::Level(l) => { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or even
But these seem like pretty minor details?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, hence the "Nit" ;)