Add modifiers in demo

As several modifiers are now supported on the same `Style` struct, make sure
that this feature is illustrated in some places of the demo.
This commit is contained in:
Florian Dehau 2019-03-10 17:43:56 +01:00
parent 43e38ac483
commit d83baab433

View file

@ -69,7 +69,7 @@ where
Style::default()
.fg(Color::Magenta)
.bg(Color::Black)
.modifier(Modifier::ITALIC),
.modifier(Modifier::ITALIC | Modifier::BOLD),
)
.label(&format!("{} / 100", app.progress))
.percent(app.progress)
@ -229,7 +229,9 @@ where
.direction(Direction::Horizontal)
.split(area);
let up_style = Style::default().fg(Color::Green);
let failure_style = Style::default().fg(Color::Red);
let failure_style = Style::default()
.fg(Color::Red)
.modifier(Modifier::RAPID_BLINK | Modifier::CROSSED_OUT);
let header = ["Server", "Location", "Status"];
let rows = app.servers.iter().map(|s| {
let style = if s.status == "Up" {