mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
@@ -11,6 +11,8 @@ class Thing(Widget):
|
||||
|
||||
|
||||
class AlignApp(App):
|
||||
CSS_PATH = "align.css"
|
||||
|
||||
def on_load(self):
|
||||
self.bind("t", "log_tree")
|
||||
|
||||
@@ -23,7 +25,6 @@ class AlignApp(App):
|
||||
self.log(self.screen.tree)
|
||||
|
||||
|
||||
app = AlignApp(css_path="align.css")
|
||||
|
||||
if __name__ == "__main__":
|
||||
app = AlignApp(css_path="align.css")
|
||||
app.run()
|
||||
|
||||
@@ -8,13 +8,14 @@ TEXT = Text.from_markup(" ".join(str(n) * 5 for n in range(12)))
|
||||
|
||||
|
||||
class AutoApp(App):
|
||||
CSS_PATH = "auto_test.css"
|
||||
|
||||
def compose(self) -> ComposeResult:
|
||||
yield Vertical(
|
||||
Static(TEXT, classes="test"), Static(TEXT, id="test", classes="test")
|
||||
)
|
||||
|
||||
|
||||
app = AutoApp(css_path="auto_test.css")
|
||||
|
||||
if __name__ == "__main__":
|
||||
app = AutoApp()
|
||||
app.run()
|
||||
|
||||
@@ -61,7 +61,6 @@ class MyTestApp(App):
|
||||
self.bind("q", "quit")
|
||||
|
||||
|
||||
app = MyTestApp()
|
||||
|
||||
if __name__ == "__main__":
|
||||
app = MyTestApp()
|
||||
app.run()
|
||||
|
||||
Reference in New Issue
Block a user