fix(editable): auto jump to next possible editable while decreasing, but ignoring zero values (#109)

* extract `format_by_duration`

* fix(editable): switch to next ignoring zero values
This commit is contained in:
Jens Krause
2025-09-29 20:48:19 +02:00
committed by GitHub
parent 816741f842
commit 6dc7eb81c2
5 changed files with 220 additions and 178 deletions

View File

@@ -372,10 +372,11 @@ impl StatefulWidget for Countdown {
.to_uppercase(),
);
let widget = ClockWidget::new(self.style, self.blink);
let area = center(
area,
Constraint::Length(max(
widget.get_width(&state.clock.get_format(), state.clock.with_decis),
widget.get_width(state.clock.get_format(), state.clock.with_decis),
label.width() as u16,
)),
Constraint::Length(widget.get_height() + 1 /* height of label */),