diff --git a/src/main.rs b/src/main.rs index 3e5bbc8..4e2747e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,12 +3,21 @@ extern crate dotenv; use fltk::{ - app, app::Screen, enums::Color, frame, /*button,*/ image, prelude::*, terminal::Terminal, + app, + app::Screen, + enums::Color, + frame, /*button,*/ + image, + prelude::*, + terminal::{/*RedrawStyle,*/ Terminal}, window, }; use fltk_theme::{ SchemeType, ThemeType, WidgetScheme, - /*ColorTheme, color_themes, widget_themes, */ WidgetTheme, + /*ColorTheme, + color_themes, + widget_themes,*/ + WidgetTheme, }; use tokio::io::{self, AsyncBufReadExt, BufReader}; @@ -80,7 +89,7 @@ async fn get_line( async fn gui() -> io::Result<()> { // let padding: i32 = 10; - let title_and_panel_h: i32 = 68; + let title_and_panel_h: i32 = 36 * 2; // let (w, h) = app::screen_size(); // println!("{} {}", w, h); @@ -101,6 +110,7 @@ async fn gui() -> io::Result<()> { } } + width = width / 3 * 2 as i32; height = height - title_and_panel_h; let app = app::App::default(); @@ -127,6 +137,7 @@ async fn gui() -> io::Result<()> { term.set_color(Color::Background2); term.set_text_color(Color::Light2); term.set_history_rows(5000); + // term.set_redraw_style(RedrawStyle::PerWrite); win.make_resizable(true); win.end();