summaryrefslogtreecommitdiff
path: root/src/app.rs
diff options
context:
space:
mode:
authorNathan Reiner <nathan@nathanreiner.xyz>2024-07-28 12:50:02 +0200
committerNathan Reiner <nathan@nathanreiner.xyz>2024-07-28 12:50:02 +0200
commit417cee4eeeaf7516dfeb59cdbe34fed18f30e0f7 (patch)
tree74354a7b14a65f4dc514b6ed0367945f69349bc4 /src/app.rs
parent6ca07d6af8a338e76817d06c6c6c6f13e64fba9c (diff)
add statusbar widget
Diffstat (limited to 'src/app.rs')
-rw-r--r--src/app.rs13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/app.rs b/src/app.rs
index b86e6ab..f60c2ca 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -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,