mirror of
https://github.com/fdehau/tui-rs.git
synced 2024-11-15 06:12:49 +00:00
fix: remove undefined crossterm attributes in windows builds
This commit is contained in:
parent
a78fa73b34
commit
52a40ec99a
@ -108,6 +108,7 @@ impl From<Color> for Option<crossterm::Color> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl From<Modifier> for Option<crossterm::Attribute> {
|
impl From<Modifier> for Option<crossterm::Attribute> {
|
||||||
|
#[cfg(unix)]
|
||||||
fn from(modifier: Modifier) -> Option<crossterm::Attribute> {
|
fn from(modifier: Modifier) -> Option<crossterm::Attribute> {
|
||||||
match modifier {
|
match modifier {
|
||||||
Modifier::Blink => Some(crossterm::Attribute::SlowBlink),
|
Modifier::Blink => Some(crossterm::Attribute::SlowBlink),
|
||||||
@ -120,4 +121,13 @@ impl From<Modifier> for Option<crossterm::Attribute> {
|
|||||||
_ => None,
|
_ => None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(windows)]
|
||||||
|
fn from(modifier: Modifier) -> Option<crossterm::Attribute> {
|
||||||
|
match modifier {
|
||||||
|
Modifier::Bold => Some(crossterm::Attribute::Bold),
|
||||||
|
Modifier::Underline => Some(crossterm::Attribute::Underlined),
|
||||||
|
_ => None,
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user