diff options
Diffstat (limited to 'src/interactive/widgets')
-rw-r--r-- | src/interactive/widgets/header.rs | 4 | ||||
-rw-r--r-- | src/interactive/widgets/main.rs | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/interactive/widgets/header.rs b/src/interactive/widgets/header.rs index d45cc06..7026b4b 100644 --- a/src/interactive/widgets/header.rs +++ b/src/interactive/widgets/header.rs @@ -5,8 +5,8 @@ use tui::widgets::{Paragraph, Text, Widget}; pub struct Header; -impl Widget for Header { - fn draw(&mut self, area: Rect, buf: &mut Buffer) { +impl Header { + pub fn render(&self, area: Rect, buf: &mut Buffer) { let bg_color = Color::LightYellow; let text_color = Color::Black; let standard = Style { diff --git a/src/interactive/widgets/main.rs b/src/interactive/widgets/main.rs index ee4e7ef..3325d91 100644 --- a/src/interactive/widgets/main.rs +++ b/src/interactive/widgets/main.rs @@ -9,7 +9,6 @@ use tui::{ buffer::Buffer, layout::{Constraint, Direction, Layout, Rect}, style::Modifier, - widgets::Widget, }; use tui_react::ToplevelComponent; @@ -79,7 +78,7 @@ impl MainWindow { FocussedPane::Help => (grey, white), }; - Header.draw(header_area, buf); + Header.render(header_area, buf); let props = EntriesProps { tree: &tree, root: state.root, |