mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
dictionary example
This commit is contained in:
@@ -30,7 +30,7 @@ class CodeBrowser(App):
|
||||
yield Header()
|
||||
yield Container(
|
||||
Vertical(DirectoryTree(path), id="tree-view"),
|
||||
Vertical(Static(id="code"), id="code-view"),
|
||||
Vertical(Static(id="code", expand=True), id="code-view"),
|
||||
)
|
||||
yield Footer()
|
||||
|
||||
@@ -41,7 +41,7 @@ class CodeBrowser(App):
|
||||
syntax = Syntax.from_path(
|
||||
event.path,
|
||||
line_numbers=True,
|
||||
word_wrap=True,
|
||||
word_wrap=False,
|
||||
indent_guides=True,
|
||||
theme="github-dark",
|
||||
)
|
||||
@@ -54,6 +54,7 @@ class CodeBrowser(App):
|
||||
self.sub_title = event.path
|
||||
|
||||
def action_toggle_files(self) -> None:
|
||||
"""Called in response to key binding."""
|
||||
self.show_tree = not self.show_tree
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user