diff options
author | Sebastian Thiel <sthiel@thoughtworks.com> | 2019-06-04 15:49:13 +0530 |
---|---|---|
committer | Sebastian Thiel <sthiel@thoughtworks.com> | 2019-06-04 15:49:13 +0530 |
commit | c19df218c6addbbcbae9feccdfed4a75693be260 (patch) | |
tree | e8e30f02b1e24574aa25febfb78e16afa1f8ed7c /src/interactive/widgets/entries.rs | |
parent | 13dd5b289c73aab5caa1d06e5580635e88ef81ad (diff) |
first simple focus tracking
Diffstat (limited to 'src/interactive/widgets/entries.rs')
-rw-r--r-- | src/interactive/widgets/entries.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/interactive/widgets/entries.rs b/src/interactive/widgets/entries.rs index b95edfc..f37804e 100644 --- a/src/interactive/widgets/entries.rs +++ b/src/interactive/widgets/entries.rs @@ -22,6 +22,7 @@ pub struct Entries<'a, 'b> { pub sorting: SortMode, pub selected: Option<TreeIndex>, pub list: &'b mut ListState, + pub borders: Borders, } impl<'a, 'b> Widget for Entries<'a, 'b> { @@ -32,6 +33,7 @@ impl<'a, 'b> Widget for Entries<'a, 'b> { display, sorting, selected, + borders, list, } = self; let is_top = |node_idx| { @@ -51,7 +53,7 @@ impl<'a, 'b> Widget for Entries<'a, 'b> { p => p, }; let title = format!(" {} ", title); - let block = Block::default().borders(Borders::ALL).title(&title); + let block = Block::default().borders(*borders).title(&title); let offset = list .update( selected.map(|selected| { |