mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
tweaks
This commit is contained in:
@@ -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 |
@@ -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 {
|
||||
|
||||
@@ -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."""
|
||||
|
||||
@@ -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%;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user