diff options
| author | Daniel Thompson <daniel@redfelineninja.org.uk> | 2021-06-20 09:21:25 (GMT) |
|---|---|---|
| committer | Daniel Thompson <daniel@redfelineninja.org.uk> | 2021-06-20 09:21:25 (GMT) |
| commit | 2a1ac322799ce0ae549110ec96dbb2caa28cf6d0 (patch) | |
| tree | d96609ec2e79aa57f180f9fccd620d4ae46ab046 /wasp/apps/fibonacci_clock.py | |
| parent | 3ea061508ff356c5df6fbad9b69e6e41fbe3eefa (diff) | |
all clocks: Add a preview() method ready for a watch face chooser
One benefit from wasp-os' dirt simple drawing model is that it is very
easy for apps to provide full screen previews of themselves. Add this
for all clocks ready for us to add a watch face chooser application.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Diffstat (limited to 'wasp/apps/fibonacci_clock.py')
| -rw-r--r-- | wasp/apps/fibonacci_clock.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/wasp/apps/fibonacci_clock.py b/wasp/apps/fibonacci_clock.py index 0f9ebfd..7124ebe 100644 --- a/wasp/apps/fibonacci_clock.py +++ b/wasp/apps/fibonacci_clock.py @@ -76,6 +76,11 @@ class FibonacciClockApp(): def tick(self, ticks): self._draw() + def preview(self): + """Provide a preview for the watch face selection.""" + wasp.system.bar.clock = False + self._draw(True) + def _draw(self, redraw=False): """Draw or lazily update the display.""" draw = wasp.watch.drawable |
