Radish alpha
r
Radicle terminal user interface
Radicle
Git (anonymous pull)
Log in to clone via SSH
patch: Improve selection progress rendering
Erik Kundt committed 2 years ago
commit 4088cf85938b12eb7375811b97cfbd552848254d
parent 5b26ed7cadee9d5a17a22e0cc811d35112739deb
1 file changed +12 -2
modified bin/commands/patch/flux/select/ui.rs
@@ -391,13 +391,23 @@ impl Patches {
                    .yellow()
                    .dim(),
                span::default(" Archived".to_string()).dim(),
+
                span::default(" | ".to_string()).style(style::border(self.props.focus)),
+
                span::default("Σ ".to_string()).dim(),
+
                span::default(self.props.patches.len().to_string()).dim(),
            ]
            .to_vec(),
        )
        .alignment(Alignment::Right);

        let (step, len) = self.table.progress(self.props.patches.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,
@@ -407,7 +417,7 @@ impl Patches {
                widths: [
                    Constraint::Fill(1),
                    Constraint::Fill(1),
-
                    Constraint::Length(progress.width() as u16),
+
                    Constraint::Length(7),
                ],
                focus: self.props.focus,
                cutoff: self.props.cutoff,