Skip to content

Terminal interface to find, download, and stream movies, TV shows, and live TV using local media players.

fix(tui): eliminate modal block background overrides and halo spillage

Samir Hossainsf676c238a69b
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b8dbd2b..a55f901 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,8 +12,8 @@
- Streamlined the in-flight display into a unified active status line with spinner (`⠋ Downloading MovieBox-Tui v...` / `⠋ Installing MovieBox-Tui v...`) and a cross-platform safety warning (`⚠ Please wait • do not close terminal` / `[!] Please wait - do not close terminal`).
### Fixed
- **Landing Screen ASCII Banner Bleed-Through**:
-- **Modal Frame Backdrop Isolation**:
- - Applied opaque theme background styling (`theme.base`) to `ModalFrame`, preventing terminal background transparency or buffer bleed through dialog borders.
+- **Modal Frame Corner Backdrops & Transparent Halos**:
+ - Removed block-level background color overrides from `ModalFrame`, eliminating dark rectangular halos and square pixel spillage around rounded corner glyphs (`╭`, `╮`, `╰`, `╯`) across transparent and custom terminal themes.
- **Update Modal Geometry & Border Clearances**:
- Widened the modal from 72 to 76 columns to align with standard dialog geometry and provide a generous 3-column safety margin, preventing text lines and bullet points from crowding the outer borders.
- **Search Bar Synthetic Cursor Artifacts**:
diff --git a/docs/cross-platform.md b/docs/cross-platform.md
index 193fffe..c1e7c63 100644
--- a/docs/cross-platform.md
+++ b/docs/cross-platform.md
@@ -42,7 +42,7 @@ prevent escape sequence probe leakage (`Gi=31...`):
fallback palette (`Theme::fallback`) using crisp cyan accents; an OSC 11 background query
picks light/dark variants. Light mode themes (including Catppuccin Latte) are tuned for
WCAG AA compliance, ensuring high-contrast readability across light terminal backgrounds.
- Modal pickers feature solid opaque backdrops, minimum 7-row breathing room, and background
+ Modal pickers feature clean transparent border backdrops, minimum 7-row breathing room, and background
selection suppression to isolate dialog focus. An explicit `MOVIEBOX_THEME` or saved theme
always wins over autodetection.
- **Keyboard & Cursor**: The kitty keyboard protocol (disambiguated escapes, event
diff --git a/src/tui/widgets/modal.rs b/src/tui/widgets/modal.rs
index a1bdab1..eed8332 100644
--- a/src/tui/widgets/modal.rs
+++ b/src/tui/widgets/modal.rs
@@ -39,8 +39,7 @@ impl<'a> ModalFrame<'a> {
.title_style(self.theme.title)
.borders(Borders::ALL)
.border_type(overlay::border_type(self.basic_terminal))
- .border_style(self.border_style.unwrap_or(self.theme.lavender))
- .style(Style::default().bg(self.theme.base));
+ .border_style(self.border_style.unwrap_or(self.theme.lavender));
let inner = block.inner(area);
frame.render_widget(block, area);
inner
@@ -72,18 +71,33 @@ mod tests {
fn test_modal_frame_render() {
let backend = TestBackend::new(80, 24);
let mut terminal = Terminal::new(backend).unwrap();
- let theme = Theme::default();
+ let theme = Theme::mocha();
+ let popup = Rect::new(10, 5, 60, 14);
terminal
.draw(|f| {
let full = Rect::new(0, 0, 80, 24);
- let popup = Rect::new(10, 5, 60, 14);
let modal = ModalFrame::new("Test Modal", &theme, false);
let inner = modal.render(f, popup, full);
assert_eq!(inner.width, 58);
assert_eq!(inner.height, 12);
})
.unwrap();
+
+ let buffer = terminal.backend().buffer();
+ assert_eq!(buffer[(popup.x, popup.y)].bg, ratatui::style::Color::Reset);
+ assert_eq!(
+ buffer[(popup.x + popup.width - 1, popup.y)].bg,
+ ratatui::style::Color::Reset
+ );
+ assert_eq!(
+ buffer[(popup.x, popup.y + popup.height - 1)].bg,
+ ratatui::style::Color::Reset
+ );
+ assert_eq!(
+ buffer[(popup.x + popup.width - 1, popup.y + popup.height - 1)].bg,
+ ratatui::style::Color::Reset
+ );
}
#[test]