-
Notifications
You must be signed in to change notification settings - Fork 1
Conversation
… improved documentation
Please, change the set_fg(ColorType::Blue)?; I'm setting color with |
Here's my take on it ...
... and now the ... pub(crate) trait Color : Sync + Send {
/// Set the foreground color to the given color.
fn set_fg(&self, fg_color: ColorType) -> Result<()>;
/// Set the background color to the given color.
fn set_bg(&self, fg_color: ColorType) -> Result<()>;
/// Reset the terminal color to default.
fn reset(&self) -> Result<()>;
} This trait is internal, which means that it can have any name. Is the As we're in the
|
Okay I agree and I prefer Color as well, I want to make sure that your okay with having twice the name name as well. |
Why twice? As I mentioned, we should rename the |
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.
Try to learn to write a changelog entry in PR. Then you wont be forced to recreate them, go through changes, etc.
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.
I think it can be merged (except the unused_imports
which should be fixed).
I'll sync & improve the documentation once this one is merged - to follow the style of the -cursor
& -terminal
& others. Started adding comments, but there were lot of them, so, I trashed them and will do a PR.
SetBg
command, WinApi logic (crossterm-style Command for SetBg bug? crossterm#261)StyledObject
, used stdout for resetting terminal colorResetColor
command