diff --git a/src/app.rs b/src/app.rs index 85aaac7..e2092f6 100644 --- a/src/app.rs +++ b/src/app.rs @@ -6,7 +6,7 @@ use crate::{ ui::Renderer, }; -struct App { +pub struct App { model: Fitch, renderer: Renderer, state: State, @@ -15,7 +15,7 @@ struct App { } impl App { - fn new() -> std::io::Result { + pub fn new() -> std::io::Result { let mut app = App { model: Fitch::new(), renderer: Renderer::new()?, @@ -38,7 +38,7 @@ impl App { } } - fn listen(&mut self) { + pub fn listen(&mut self) { loop { if self.state == State::Quit { break; diff --git a/src/main.rs b/src/main.rs index 8202610..fec5880 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,6 +3,9 @@ mod fitch; mod parser; mod ui; +use app::App; + fn main() { - println!("Hello, world!"); + let mut app = App::new().unwrap(); + app.listen(); } diff --git a/src/ui.rs b/src/ui.rs index 06acd78..28a8c1e 100644 --- a/src/ui.rs +++ b/src/ui.rs @@ -86,8 +86,8 @@ fn expression_box_area(whole: Rect) -> Rect { let temp = Layout::default() .direction(Direction::Vertical) .constraints([ - Constraint::Length(whole.height / 2 - 1), - Constraint::Length(1), + Constraint::Length(whole.height / 2 - 3), + Constraint::Length(3), Constraint::Length(whole.height / 2), ]) .split(whole)[1];