From fee61c023b837038aa92862f49d810cf50326f1b Mon Sep 17 00:00:00 2001 From: dcorral Date: Thu, 6 Nov 2025 21:56:35 +0100 Subject: [PATCH] remove backfround fill --- src/main.rs | 9 ++++----- src/ui.rs | 6 +++--- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/main.rs b/src/main.rs index 99fa143..1ca0234 100644 --- a/src/main.rs +++ b/src/main.rs @@ -12,11 +12,10 @@ use std::io::stdout; fn main() -> Result<(), Box> { enable_raw_mode()?; - let (mut width, mut height) = crossterm::terminal::size()?; - if width == 0 || height == 0 { - width = 80; - height = 24; - } + let (width, height) = match crossterm::terminal::size() { + Ok((w, h)) if w > 0 && h > 0 => (w, h), + _ => (80, 24), + }; println!("Width: {}, Height: {}", width, height); let use_alternate_screen = std::env::var("SSH_CLIENT").is_err() && std::env::var("SSH_TTY").is_err(); diff --git a/src/ui.rs b/src/ui.rs index 0df1c2f..378a194 100644 --- a/src/ui.rs +++ b/src/ui.rs @@ -9,8 +9,8 @@ use ratatui::{ use crate::app::App; pub fn draw(f: &mut Frame, app: &App, blink: bool) { - let bg_block = Block::default().style(Style::default().bg(app.theme.bg)); - f.render_widget(bg_block, f.size()); + // let bg_block = Block::default().style(Style::default().bg(app.theme.bg)); + // f.render_widget(bg_block, f.size()); if app.show_welcome { let fg = app.theme.fg; @@ -102,7 +102,7 @@ pub fn draw(f: &mut Frame, app: &App, blink: bool) { } let help_text = Paragraph::new("Use hjkl or arrows to navigate, ? for help, q to quit") - .style(Style::default().fg(app.theme.fg).bg(app.theme.bg)); + .style(Style::default().fg(app.theme.fg)); f.render_widget(help_text, chunks[1]); } }