changed to CSS_PATH

This commit is contained in:
Will McGugan
2022-09-18 22:02:08 +01:00
parent f2c5e6ce78
commit d0293c2c89
80 changed files with 261 additions and 741 deletions

View File

@@ -71,6 +71,8 @@ class Stopwatch(Static):
class StopwatchApp(App):
"""A Textual app to manage stopwatches."""
CSS_PATH = "stopwatch.css"
BINDINGS = [
("d", "toggle_dark", "Toggle dark mode"),
("a", "add_stopwatch", "Add"),
@@ -100,6 +102,6 @@ class StopwatchApp(App):
self.dark = not self.dark
app = StopwatchApp(css_path="stopwatch.css")
if __name__ == "__main__":
app = StopwatchApp()
app.run()

View File

@@ -17,6 +17,6 @@ class StopwatchApp(App):
self.dark = not self.dark
app = StopwatchApp()
if __name__ == "__main__":
app = StopwatchApp()
app.run()

View File

@@ -34,6 +34,6 @@ class StopwatchApp(App):
self.dark = not self.dark
app = StopwatchApp()
if __name__ == "__main__":
app = StopwatchApp()
app.run()

View File

@@ -21,6 +21,7 @@ class Stopwatch(Static):
class StopwatchApp(App):
"""A Textual app to manage stopwatches."""
CSS_PATH = "stopwatch03.css"
BINDINGS = [("d", "toggle_dark", "Toggle dark mode")]
def compose(self) -> ComposeResult:
@@ -34,6 +35,6 @@ class StopwatchApp(App):
self.dark = not self.dark
app = StopwatchApp(css_path="stopwatch03.css")
if __name__ == "__main__":
app = StopwatchApp()
app.run()

View File

@@ -28,6 +28,7 @@ class Stopwatch(Static):
class StopwatchApp(App):
"""A Textual app to manage stopwatches."""
CSS_PATH = "stopwatch04.css"
BINDINGS = [("d", "toggle_dark", "Toggle dark mode")]
def compose(self) -> ComposeResult:
@@ -41,6 +42,6 @@ class StopwatchApp(App):
self.dark = not self.dark
app = StopwatchApp(css_path="stopwatch04.css")
if __name__ == "__main__":
app = StopwatchApp()
app.run()

View File

@@ -48,6 +48,7 @@ class Stopwatch(Static):
class StopwatchApp(App):
"""A Textual app to manage stopwatches."""
CSS_PATH = "stopwatch04.css"
BINDINGS = [("d", "toggle_dark", "Toggle dark mode")]
def compose(self) -> ComposeResult:
@@ -61,6 +62,6 @@ class StopwatchApp(App):
self.dark = not self.dark
app = StopwatchApp(css_path="stopwatch04.css")
if __name__ == "__main__":
app = StopwatchApp()
app.run()

View File

@@ -71,6 +71,7 @@ class Stopwatch(Static):
class StopwatchApp(App):
"""A Textual app to manage stopwatches."""
CSS_PATH = "stopwatch04.css"
BINDINGS = [("d", "toggle_dark", "Toggle dark mode")]
def compose(self) -> ComposeResult:
@@ -84,6 +85,6 @@ class StopwatchApp(App):
self.dark = not self.dark
app = StopwatchApp(css_path="stopwatch04.css")
if __name__ == "__main__":
app = StopwatchApp()
app.run()