summaryrefslogtreecommitdiff
path: root/wasp/apps/stopwatch.py
blob: 60c0f9f46057aef412cc755109ebea58b663f165 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# SPDX-License-Identifier: LGPL-3.0-or-later
# Copyright (C) 2020 Daniel Thompson

import wasp
import icons

class StopwatchApp():
    NAME = 'Stopwatch'
    ICON = icons.app

    def foreground(self):
        """Activate the application."""
        self._draw()

    def _draw(self):
        """Draw the display from scratch."""
        draw = wasp.watch.drawable
        draw.fill()
        draw.string(self.NAME, 0, 6, width=240)