Skip to content

Commit 746d126

Browse files
committed
Show duration in trim modal if present
1 parent 0a45463 commit 746d126

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/ui/modal_trim.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,12 @@ impl UiModal for TrimModal {
9393
.title(Span::styled("Start", start_label_style)),
9494
)
9595
.render(ss_area, frame.buffer_mut());
96-
let to_title = if self.use_to { "To" } else { "Duration" };
96+
let title = if self.use_to { "To" } else { "Duration" };
97+
let to_title = if let Some(dur) = self.duration {
98+
format!("{} (max {:.2})", title, dur)
99+
} else {
100+
title.to_owned()
101+
};
97102
Paragraph::new(to_value)
98103
.block(
99104
Block::bordered()

0 commit comments

Comments
 (0)