From 417cee4eeeaf7516dfeb59cdbe34fed18f30e0f7 Mon Sep 17 00:00:00 2001 From: Nathan Reiner Date: Sun, 28 Jul 2024 12:50:02 +0200 Subject: add statusbar widget --- src/app.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/app.rs') 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>, + view: SheetView, + logview: Option, } -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, -- cgit v1.2.3-70-g09d2