From 0c8977192fbbfa8623716bb541c0348d430f05be Mon Sep 17 00:00:00 2001 From: nyx Date: Thu, 31 Oct 2024 14:27:13 -0400 Subject: [PATCH] fix color bleeding (#723) Co-authored-by: nyx --- tui/src/floating_text.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tui/src/floating_text.rs b/tui/src/floating_text.rs index 879fcbc5..da988afd 100644 --- a/tui/src/floating_text.rs +++ b/tui/src/floating_text.rs @@ -205,7 +205,8 @@ impl FloatContent for FloatingText { .title_style(Style::default().reversed()) .style(Style::default()); - // Draw the Block first + frame.render_widget(Clear, area); + frame.render_widget(block.clone(), area); // Calculate the inner area to ensure text is not drawn over the border @@ -253,9 +254,6 @@ impl FloatContent for FloatingText { .block(Block::default()) .highlight_style(Style::default().reversed()); - // Clear the text underneath the floats rendered area - frame.render_widget(Clear, inner_area); - // Render the list inside the bordered area frame.render_widget(list, inner_area); }