mirror of
https://github.com/ratatui-org/ratatui
synced 2024-11-26 06:30:29 +00:00
[examples][list] Change style of first list
This commit is contained in:
parent
fcd1b7b187
commit
f620af1455
1 changed files with 3 additions and 1 deletions
|
@ -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]);
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue