Radish alpha
r
Radicle terminal user interface
Radicle
Git (anonymous pull)
Log in to clone via SSH
inbox: Improve selection progress rendering
Erik Kundt committed 2 years ago
commit 1d2b410a1c4c76e29f35c08df4884dc6e4cc648c
parent 4088cf85938b12eb7375811b97cfbd552848254d
1 file changed +12 -2
modified 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::<B>(
            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,