diff options
| author | Nathan Reiner <nathan@nathanreiner.xyz> | 2024-07-28 12:50:02 +0200 |
|---|---|---|
| committer | Nathan Reiner <nathan@nathanreiner.xyz> | 2024-07-28 12:50:02 +0200 |
| commit | 417cee4eeeaf7516dfeb59cdbe34fed18f30e0f7 (patch) | |
| tree | 74354a7b14a65f4dc514b6ed0367945f69349bc4 /src/app.rs | |
| parent | 6ca07d6af8a338e76817d06c6c6c6f13e64fba9c (diff) | |
add statusbar widget
Diffstat (limited to 'src/app.rs')
| -rw-r--r-- | src/app.rs | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -10,16 +10,15 @@ use crate::{ use ratatui::{ crossterm::event::{self, Event, KeyCode, KeyEvent, KeyEventKind, KeyModifiers}, prelude::*, - widgets::Block, }; -pub struct App<'a> { +pub struct App { exit: bool, - view: SheetView<'a>, - logview: Option<LogView<'a>>, + view: SheetView, + logview: Option<LogView>, } -impl App<'_> { +impl App { pub fn new() -> Self { let sheet_id = Register::create(200, 1000); let sheet = Register::get(sheet_id).unwrap(); @@ -81,7 +80,7 @@ impl App<'_> { match self.logview { Some(_) => self.logview = None, None => { - self.logview = Some(LogView::new().block(Block::bordered().title(" Log "))) + self.logview = Some(LogView::new()) } } } @@ -94,7 +93,7 @@ impl App<'_> { } } -impl Widget for &mut App<'_> { +impl Widget for &mut App { fn render(self, area: Rect, buf: &mut Buffer) where Self: Sized, |