Merge branch 'main' of github.com:Textualize/textual into list-view

This commit is contained in:
Darren Burns
2022-11-30 12:15:08 +00:00
33 changed files with 1046 additions and 47 deletions

View File

@@ -48,7 +48,7 @@ class Hello(Static):
class CustomApp(App):
CSS_PATH = "hello03.css"
CSS_PATH = "hello04.css"
def compose(self) -> ComposeResult:
yield Hello()

View File

@@ -32,13 +32,13 @@ class TimeDisplay(Static):
self.start_time = monotonic()
self.update_timer.resume()
def stop(self):
def stop(self) -> None:
"""Method to stop the time display updating."""
self.update_timer.pause()
self.total += monotonic() - self.start_time
self.time = self.total
def reset(self):
def reset(self) -> None:
"""Method to reset the time display to zero."""
self.total = 0
self.time = 0