fix(example): show state in bottom title
This commit is contained in:
+5
-1
@@ -120,7 +120,11 @@ fn run_app<B: Backend>(terminal: &mut Terminal<B>, mut app: App) -> io::Result<(
|
||||
let area = frame.size();
|
||||
let widget = Tree::new(app.items.clone())
|
||||
.expect("all item identifiers are unique")
|
||||
.block(Block::bordered().title(format!("Tree Widget {:?}", app.state)))
|
||||
.block(
|
||||
Block::bordered()
|
||||
.title("Tree Widget")
|
||||
.title_bottom(format!("{:?}", app.state)),
|
||||
)
|
||||
.scrollbar_margin(Margin::new(0, 1))
|
||||
.scrollbar(Some(
|
||||
Scrollbar::new(ScrollbarOrientation::VerticalRight)
|
||||
|
||||
Reference in New Issue
Block a user