summaryrefslogtreecommitdiff
path: root/wasp/apps/stopwatch.py
diff options
context:
space:
mode:
authorDaniel Thompson <daniel@redfelineninja.org.uk>2020-11-04 19:00:37 (GMT)
committerDaniel Thompson <daniel@redfelineninja.org.uk>2020-11-04 19:00:37 (GMT)
commit8e89e381751e79b1bc768886263d02f1b72dfbac (patch)
tree53ad3e1231a123cb83b72cea2d18c4b52a3d2c7c /wasp/apps/stopwatch.py
parentf95f45cda3b4ef2baae1c952521d729fbad00577 (diff)
manager: Introduce shared "system bar"
Providing a status bar for all apps to use allows us to reduce allocations within the applications. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Diffstat (limited to 'wasp/apps/stopwatch.py')
-rw-r--r--wasp/apps/stopwatch.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/wasp/apps/stopwatch.py b/wasp/apps/stopwatch.py
index 807830c..43166a6 100644
--- a/wasp/apps/stopwatch.py
+++ b/wasp/apps/stopwatch.py
@@ -17,12 +17,12 @@ class StopwatchApp():
ICON = icons.app
def __init__(self):
- self._bar = wasp.widgets.StatusBar()
self._reset()
self._count = 0
def foreground(self):
"""Activate the application."""
+ wasp.system.bar.clock = True
self._draw()
wasp.system.request_tick(97)
wasp.system.request_event(wasp.EventMask.TOUCH |
@@ -111,7 +111,7 @@ class StopwatchApp():
self._last_count = -1
self._update()
- self._bar.draw()
+ wasp.system.bar.draw()
self._draw_splits()
def _update(self):
@@ -125,7 +125,7 @@ class StopwatchApp():
self._reset()
# Update the statusbar
- self._bar.update()
+ wasp.system.bar.update()
if self._last_count != self._count:
centisecs = self._count