fluid rendering

This commit is contained in:
Will McGugan
2022-09-18 11:25:16 +01:00
parent 614b29e222
commit 9838d3b34e
9 changed files with 114 additions and 71 deletions

View File

@@ -1,19 +0,0 @@
from textual.app import App
from textual.widgets import Button
class ButtonApp(App):
DEFAULT_CSS = """
Button {
width: 100%;
}
"""
def compose(self):
yield Button("Lights off")
def on_button_pressed(self, event):
self.dark = not self.dark
self.bell()
event.button.label = "Lights ON" if self.dark else "Lights OFF"