mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
optimized line rendering and updated render_lines API
This commit is contained in:
@@ -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())
|
||||
|
||||
@@ -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__":
|
||||
|
||||
Reference in New Issue
Block a user