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

@@ -17,7 +17,7 @@ class Clock(Widget):
class ClockApp(App):
async def on_mount(self):
await self.view.dock(Clock())
await self.screen.dock(Clock())
ClockApp.run()

View File

@@ -26,7 +26,7 @@ class HoverApp(App):
"""Build layout here."""
hovers = (Hover() for _ in range(10))
await self.view.dock(*hovers, edge="top")
await self.screen.dock(*hovers, edge="top")
HoverApp.run(log="textual.log")

View File

@@ -8,8 +8,8 @@ class SimpleApp(App):
async def on_mount(self) -> None:
"""Build layout here."""
await self.view.dock(Placeholder(), edge="left", size=40)
await self.view.dock(Placeholder(), Placeholder(), edge="top")
await self.screen.dock(Placeholder(), edge="left", size=40)
await self.screen.dock(Placeholder(), Placeholder(), edge="top")
SimpleApp.run(log="textual.log")