compositor and cache optimizations

This commit is contained in:
Will McGugan
2022-06-08 11:46:53 +01:00
parent 7914ab9c83
commit 0ff8c7e47c
11 changed files with 107 additions and 43 deletions

21
examples/pride.py Normal file
View File

@@ -0,0 +1,21 @@
from textual.app import App
from textual.widgets import Static
class PrideApp(App):
"""Displays a pride flag."""
COLORS = ["red", "orange", "yellow", "green", "blue", "purple"]
def compose(self):
for color in self.COLORS:
stripe = Static()
stripe.styles.height = "1fr"
stripe.styles.background = color
yield stripe
app = PrideApp()
if __name__ == "__main__":
app.run()