From 1daf1c177d90e98916865409e9b932a3d933411c Mon Sep 17 00:00:00 2001 From: Jack Wills <32690432+mrjackwills@users.noreply.github.com> Date: Fri, 29 Apr 2022 03:14:35 +0000 Subject: [PATCH] fix: info box lines --- src/ui/draw_blocks.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/ui/draw_blocks.rs b/src/ui/draw_blocks.rs index 20dfc50..451a3ac 100644 --- a/src/ui/draw_blocks.rs +++ b/src/ui/draw_blocks.rs @@ -608,8 +608,6 @@ pub fn draw_info(f: &mut Frame<'_, B>, text: String) { .title_alignment(Alignment::Center) .borders(Borders::NONE); - // Add a blank line, so that the text is verticall centered - let text = format!("\n{}", text); let mut max_line_width = 0; text.lines().into_iter().for_each(|line| { @@ -623,7 +621,7 @@ pub fn draw_info(f: &mut Frame<'_, B>, text: String) { // Add some horizontal & vertical margins max_line_width += 8; - lines += 3; + lines += 2; let paragraph = Paragraph::new(text) .style(Style::default().bg(Color::Blue).fg(Color::White))