From 1d2b410a1c4c76e29f35c08df4884dc6e4cc648c Mon Sep 17 00:00:00 2001 From: Erik Kundt Date: Fri, 1 Mar 2024 15:58:14 +0100 Subject: [PATCH] inbox: Improve selection progress rendering --- bin/commands/inbox/flux/select/ui.rs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/bin/commands/inbox/flux/select/ui.rs b/bin/commands/inbox/flux/select/ui.rs index 1dffadfa..8a595594 100644 --- a/bin/commands/inbox/flux/select/ui.rs +++ b/bin/commands/inbox/flux/select/ui.rs @@ -346,13 +346,23 @@ impl Notifications { .magenta() .dim(), span::default(" Unseen".to_string()).dim(), + span::default(" | ".to_string()).style(style::border(self.props.focus)), + span::default("Σ ".to_string()).dim(), + span::default(self.props.notifications.len().to_string()).dim(), ] .to_vec(), ) .alignment(Alignment::Right); let (step, len) = self.table.progress(self.props.notifications.len()); - let progress = span::progress(step, len, false); + let progress = Line::from( + [ + span::default("| ".to_string()).style(style::border(self.props.focus)), + span::progress(step, len), + ] + .to_vec(), + ) + .alignment(Alignment::Left); self.footer.render::( frame, @@ -362,7 +372,7 @@ impl Notifications { widths: [ Constraint::Fill(1), Constraint::Fill(1), - Constraint::Length(progress.width() as u16), + Constraint::Length(7), ], focus: self.props.focus, cutoff: self.props.cutoff,