optimized line rendering and updated render_lines API

This commit is contained in:
Will McGugan
2022-06-15 17:13:56 +01:00
parent 5edefcf29f
commit b0079fce56
9 changed files with 116 additions and 89 deletions

View File

@@ -174,3 +174,6 @@ if __name__ == "__main__":
from textual.css.scalar import Scalar
print(Scalar.resolve_dimension.cache_info())
from rich.style import Style
print(Style.__add__.cache_info())

View File

@@ -21,10 +21,14 @@ class TableApp(App):
def on_mount(self):
self.bind("d", "toggle_dark")
self.bind("z", "toggle_zebra")
def action_toggle_dark(self) -> None:
self.app.dark = not self.app.dark
def action_toggle_zebra(self) -> None:
self.table.zebra_stripes = not self.table.zebra_stripes
app = TableApp()
if __name__ == "__main__":