refactor of compositor

This commit is contained in:
Will McGugan
2022-03-02 15:39:26 +00:00
parent 7c64c7813c
commit 237c556673
50 changed files with 429 additions and 342 deletions

View File

@@ -1,3 +1,4 @@
from tkinter import Place
from textual.app import App
from textual import events
from textual.widgets import Placeholder
@@ -9,7 +10,22 @@ class BasicApp(App):
def on_mount(self):
"""Build layout here."""
self.mount(uber=Placeholder())
uber2 = Widget()
uber2.add_children(
Placeholder(id="uber2-child1"),
Placeholder(id="uber2-child2"),
)
self.mount(
uber=Widget(
Placeholder(id="child1"),
Placeholder(id="child2"),
Placeholder(id="child3"),
),
uber2=uber2,
)
# self.panic(self.tree)
async def on_key(self, event: events.Key) -> None:
await self.dispatch_key(event)