mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
screens api
This commit is contained in:
@@ -4,7 +4,7 @@ from textual.widgets import Static, Footer, Pretty
|
||||
|
||||
class ModalScreen(Screen):
|
||||
def compose(self) -> ComposeResult:
|
||||
yield Pretty(self.app._screen_stack)
|
||||
yield Pretty(self.app.screen_stack)
|
||||
yield Footer()
|
||||
|
||||
def on_screen_resume(self):
|
||||
@@ -13,7 +13,7 @@ class ModalScreen(Screen):
|
||||
|
||||
class NewScreen(Screen):
|
||||
def compose(self):
|
||||
yield Pretty(self.app._screen_stack)
|
||||
yield Pretty(self.app.screen_stack)
|
||||
yield Footer()
|
||||
|
||||
def on_screen_resume(self):
|
||||
@@ -53,10 +53,6 @@ class ScreenApp(App):
|
||||
self.bind("s", "modal_screen", description="add screen")
|
||||
self.bind("escape", "back", description="Go back")
|
||||
|
||||
def action_back(self) -> None:
|
||||
self.pop_screen()
|
||||
self.log(self.app._registry)
|
||||
|
||||
def action_modal_screen(self) -> None:
|
||||
self.push_screen(ModalScreen())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user