This commit is contained in:
@@ -8,7 +8,7 @@ use crossterm::{
|
|||||||
terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen},
|
terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen},
|
||||||
};
|
};
|
||||||
use ratatui::{backend::CrosstermBackend, Terminal};
|
use ratatui::{backend::CrosstermBackend, Terminal};
|
||||||
use std::io::stdout;
|
use std::io::{stdout, Write};
|
||||||
|
|
||||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
eprintln!("TUI started");
|
eprintln!("TUI started");
|
||||||
@@ -19,7 +19,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||||||
_ => (80, 24),
|
_ => (80, 24),
|
||||||
};
|
};
|
||||||
println!("Width: {}, Height: {}", width, height);
|
println!("Width: {}, Height: {}", width, height);
|
||||||
let use_alternate_screen = true;
|
let use_alternate_screen = false;
|
||||||
let mut stdout = stdout();
|
let mut stdout = stdout();
|
||||||
if use_alternate_screen {
|
if use_alternate_screen {
|
||||||
execute!(stdout, EnterAlternateScreen)?;
|
execute!(stdout, EnterAlternateScreen)?;
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ use ratatui::{
|
|||||||
use crate::app::App;
|
use crate::app::App;
|
||||||
|
|
||||||
pub fn draw(f: &mut Frame, app: &App, blink: bool) {
|
pub fn draw(f: &mut Frame, app: &App, blink: bool) {
|
||||||
let bg_block = Block::default().style(Style::default().bg(app.theme.bg));
|
// let bg_block = Block::default().style(Style::default().bg(app.theme.bg));
|
||||||
f.render_widget(bg_block, f.size());
|
// f.render_widget(bg_block, f.size());
|
||||||
|
|
||||||
if app.show_welcome {
|
if app.show_welcome {
|
||||||
let fg = app.theme.fg;
|
let fg = app.theme.fg;
|
||||||
|
|||||||
Reference in New Issue
Block a user