[examples][list] Change style of first list

This commit is contained in:
Florian Dehau 2018-04-01 10:34:56 +02:00
parent fcd1b7b187
commit f620af1455

View file

@ -160,11 +160,13 @@ fn draw(t: &mut Terminal<MouseBackend>, app: &App) {
.direction(Direction::Horizontal) .direction(Direction::Horizontal)
.sizes(&[Size::Percent(50), Size::Percent(50)]) .sizes(&[Size::Percent(50), Size::Percent(50)])
.render(t, &app.size, |t, chunks| { .render(t, &app.size, |t, chunks| {
let style = Style::default().fg(Color::Black).bg(Color::White);
SelectableList::default() SelectableList::default()
.block(Block::default().borders(Borders::ALL).title("List")) .block(Block::default().borders(Borders::ALL).title("List"))
.items(&app.items) .items(&app.items)
.select(app.selected) .select(app.selected)
.highlight_style(Style::default().fg(Color::Yellow).modifier(Modifier::Bold)) .style(style)
.highlight_style(style.clone().fg(Color::LightGreen).modifier(Modifier::Bold))
.highlight_symbol(">") .highlight_symbol(">")
.render(t, &chunks[0]); .render(t, &chunks[0]);
{ {