generated from PlexSheep/rs-base
fix(modeshow): force all segments of the time to have 2 digits
cargo devel CI / cargo CI (push) Successful in 1m47s
Details
cargo devel CI / cargo CI (push) Successful in 1m47s
Details
This commit is contained in:
parent
2526771026
commit
01c3f44026
|
@ -155,8 +155,12 @@ pub fn timebarw_label<'a>(
|
||||||
// example with `-o` #17
|
// example with `-o` #17
|
||||||
.checked_add_signed(len.into())
|
.checked_add_signed(len.into())
|
||||||
.expect("could not calculate when the countdown finishes");
|
.expect("could not calculate when the countdown finishes");
|
||||||
let timestamp_until: String =
|
let timestamp_until: String = format!(
|
||||||
format!("{}:{}:{}", until.hour(), until.minute(), until.second());
|
"{:02}:{:02}:{:02}",
|
||||||
|
until.hour(),
|
||||||
|
until.minute(),
|
||||||
|
until.second()
|
||||||
|
);
|
||||||
Paragraph::new(format!("{time_now} / {len} ({timestamp_until})"))
|
Paragraph::new(format!("{time_now} / {len} ({timestamp_until})"))
|
||||||
.alignment(Alignment::Center)
|
.alignment(Alignment::Center)
|
||||||
.block(
|
.block(
|
||||||
|
|
Reference in New Issue