diff --git a/src/view.rs b/src/view.rs index ecf0719..cad70a0 100644 --- a/src/view.rs +++ b/src/view.rs @@ -67,14 +67,11 @@ impl Taggart { pub(crate) const FG_MODAL: Color = Color::Rgb(255, 255, 255); pub(crate) const BG_MODAL: Color = Color::Rgb(0, 0, 0); fn modal (content: impl Content) -> impl Content { - let position = |x|Fill::xy( - Align::c(x)); - let style = |x|Tui::modify(false, Modifier::DIM, - Tui::fg_bg(Self::FG_MODAL, Self::BG_MODAL, x)); - let border = |x|Margin::xy(1, 1, Bsp::b( - Border(true, Lozenge(true, Default::default())), - x)); - position(style(border(content))) + let pos = |x|Fill::xy( Align::c(x)); + let style = |x|Tui::modify(false, Modifier::DIM, Tui::fg_bg(Self::FG_MODAL, Self::BG_MODAL, x)); + let border = |x|Margin::xy(1, 1, Bsp::b(Border(true, Lozenge(true, Default::default())), x)); + let bg = |x|Bsp::a(x, Repeat(" ")); + pos(style(border(bg(content)))) } fn title_bar (&self) -> impl Content { status_bar(