Skip to content

Commit c083950

Browse files
authored
Demo fixes (Textualize#5185)
* Fix import in demo app * Prevent VerticalScroll focus
1 parent ca923f7 commit c083950

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/textual/demo/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from textual.demo2.demo_app import DemoApp
1+
from textual.demo.demo_app import DemoApp
22

33
if __name__ == "__main__":
44
app = DemoApp()

src/textual/demo/projects.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,8 @@ class ProjectsScreen(PageScreen):
211211
"""
212212

213213
def compose(self) -> ComposeResult:
214-
with VerticalScroll():
214+
with VerticalScroll() as container:
215+
container.can_focus = False
215216
with Center():
216217
yield Markdown(PROJECTS_MD)
217218
with ItemGrid(min_column_width=40):

src/textual/demo/widgets.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,8 @@ class WidgetsScreen(PageScreen):
449449
BINDINGS = [("escape", "unfocus")]
450450

451451
def compose(self) -> ComposeResult:
452-
with containers.VerticalScroll():
452+
with containers.VerticalScroll() as container:
453+
container.can_focus = False
453454
yield Markdown(WIDGETS_MD, classes="column")
454455
yield Buttons()
455456
yield Checkboxes()

0 commit comments

Comments
 (0)