diff options
| author | Daniel Thompson <daniel@redfelineninja.org.uk> | 2021-01-12 20:22:44 (GMT) |
|---|---|---|
| committer | Daniel Thompson <daniel@redfelineninja.org.uk> | 2021-01-12 20:22:44 (GMT) |
| commit | 05310a82f8bb8e5df07e1c393e0f602ae5d0de9d (patch) | |
| tree | 6f0a20d28fc99c4242683b4a45ea1021d2ad8962 /wasp/apps | |
| parent | 9314eeafbc48f00af78f10dec801d852c6a63ac4 (diff) | |
widgets: Clarity whether spinner max is inclusive or exclusive
Currently the spinner uses exclusive max when wrapping from low to high
and inclusive max when wrapping from high to low. Fix this by adopting
*inclusive* max everywhere. The call sites are similarly confused.
Fix this!
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Diffstat (limited to 'wasp/apps')
| -rw-r--r-- | wasp/apps/alarm.py | 4 | ||||
| -rw-r--r-- | wasp/apps/timer.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/wasp/apps/alarm.py b/wasp/apps/alarm.py index 7b08c2d..c3c1847 100644 --- a/wasp/apps/alarm.py +++ b/wasp/apps/alarm.py @@ -58,8 +58,8 @@ class AlarmApp(): def __init__(self): """Initialize the application.""" self.active = widgets.Checkbox(104, 200) - self.hours = widgets.Spinner(50, 60, 0, 24, 2) - self.minutes = widgets.Spinner(130, 60, 0, 60, 2) + self.hours = widgets.Spinner(50, 60, 0, 23, 2) + self.minutes = widgets.Spinner(130, 60, 0, 59, 2) self.hours.value = 7 self.ringing = False diff --git a/wasp/apps/timer.py b/wasp/apps/timer.py index f1543f8..648d45c 100644 --- a/wasp/apps/timer.py +++ b/wasp/apps/timer.py @@ -62,7 +62,7 @@ class TimerApp(): def __init__(self): """Initialize the application.""" self.minutes = widgets.Spinner(50, 60, 0, 99, 2) - self.seconds = widgets.Spinner(130, 60, 0, 60, 2) + self.seconds = widgets.Spinner(130, 60, 0, 59, 2) self.current_alarm = None self.minutes.value = 10 |
