Update
This commit is contained in:
parent
66f58a3cae
commit
343e5c27ec
17
src/main.rs
17
src/main.rs
|
@ -3,12 +3,21 @@
|
||||||
extern crate dotenv;
|
extern crate dotenv;
|
||||||
|
|
||||||
use fltk::{
|
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,
|
window,
|
||||||
};
|
};
|
||||||
use fltk_theme::{
|
use fltk_theme::{
|
||||||
SchemeType, ThemeType, WidgetScheme,
|
SchemeType, ThemeType, WidgetScheme,
|
||||||
/*ColorTheme, color_themes, widget_themes, */ WidgetTheme,
|
/*ColorTheme,
|
||||||
|
color_themes,
|
||||||
|
widget_themes,*/
|
||||||
|
WidgetTheme,
|
||||||
};
|
};
|
||||||
|
|
||||||
use tokio::io::{self, AsyncBufReadExt, BufReader};
|
use tokio::io::{self, AsyncBufReadExt, BufReader};
|
||||||
|
@ -80,7 +89,7 @@ async fn get_line(
|
||||||
async fn gui() -> io::Result<()> {
|
async fn gui() -> io::Result<()> {
|
||||||
// let padding: i32 = 10;
|
// 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();
|
// let (w, h) = app::screen_size();
|
||||||
// println!("{} {}", w, h);
|
// println!("{} {}", w, h);
|
||||||
|
@ -101,6 +110,7 @@ async fn gui() -> io::Result<()> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
width = width / 3 * 2 as i32;
|
||||||
height = height - title_and_panel_h;
|
height = height - title_and_panel_h;
|
||||||
|
|
||||||
let app = app::App::default();
|
let app = app::App::default();
|
||||||
|
@ -127,6 +137,7 @@ async fn gui() -> io::Result<()> {
|
||||||
term.set_color(Color::Background2);
|
term.set_color(Color::Background2);
|
||||||
term.set_text_color(Color::Light2);
|
term.set_text_color(Color::Light2);
|
||||||
term.set_history_rows(5000);
|
term.set_history_rows(5000);
|
||||||
|
// term.set_redraw_style(RedrawStyle::PerWrite);
|
||||||
|
|
||||||
win.make_resizable(true);
|
win.make_resizable(true);
|
||||||
win.end();
|
win.end();
|
||||||
|
|
Loading…
Reference in New Issue