This commit is contained in:
Will McGugan
2022-09-09 17:52:08 +01:00
parent 8666e84e64
commit 73fa5010ad
5 changed files with 7 additions and 179 deletions

View File

@@ -2,6 +2,7 @@
# Textual
Textual is a Python framework for creating applications within your terminal.
Textual is a Python framework for creating applications within your terminal—powered by [Rich](https://github.com/Textualize/rich).

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 36 KiB

View File

@@ -9,16 +9,15 @@ CodeBrowser.-show-tree #tree-view {
dock: left;
height: 100%;
max-width: 50%;
background: $surface;
background: $panel;
}
CodeBrowser{
background: $surface-darken-1;
background: $background;
}
DirectoryTree {
padding-right: 1;
}
#code {

View File

@@ -5,7 +5,7 @@ from rich.traceback import Traceback
from textual.app import App, ComposeResult
from textual.layout import Container, Vertical
from textual.reactive import Reactive
from textual.reactive import var
from textual.widgets import DirectoryTree, Footer, Header, Static
@@ -17,7 +17,7 @@ class CodeBrowser(App):
("q", "quit", "Quit"),
]
show_tree = Reactive.init(True)
show_tree = var(True)
def watch_show_tree(self, show_tree: bool) -> None:
"""Called when show_tree is modified."""

View File

@@ -164,8 +164,8 @@ class TreeNode(Generic[NodeDataType]):
class TreeControl(Generic[NodeDataType], Static, can_focus=True):
DEFAULT_CSS = """
TreeControl {
background: $surface;
color: $text-surface;
background: $panel;
color: $text-panel;
height: auto;
width: 100%;
}