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
|
||||||
|
|
||||||
|
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).
|
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;
|
dock: left;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
max-width: 50%;
|
max-width: 50%;
|
||||||
background: $surface;
|
background: $panel;
|
||||||
}
|
}
|
||||||
|
|
||||||
CodeBrowser{
|
CodeBrowser{
|
||||||
background: $surface-darken-1;
|
background: $background;
|
||||||
}
|
}
|
||||||
|
|
||||||
DirectoryTree {
|
DirectoryTree {
|
||||||
padding-right: 1;
|
padding-right: 1;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#code {
|
#code {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ from rich.traceback import Traceback
|
|||||||
|
|
||||||
from textual.app import App, ComposeResult
|
from textual.app import App, ComposeResult
|
||||||
from textual.layout import Container, Vertical
|
from textual.layout import Container, Vertical
|
||||||
from textual.reactive import Reactive
|
from textual.reactive import var
|
||||||
from textual.widgets import DirectoryTree, Footer, Header, Static
|
from textual.widgets import DirectoryTree, Footer, Header, Static
|
||||||
|
|
||||||
|
|
||||||
@@ -17,7 +17,7 @@ class CodeBrowser(App):
|
|||||||
("q", "quit", "Quit"),
|
("q", "quit", "Quit"),
|
||||||
]
|
]
|
||||||
|
|
||||||
show_tree = Reactive.init(True)
|
show_tree = var(True)
|
||||||
|
|
||||||
def watch_show_tree(self, show_tree: bool) -> None:
|
def watch_show_tree(self, show_tree: bool) -> None:
|
||||||
"""Called when show_tree is modified."""
|
"""Called when show_tree is modified."""
|
||||||
|
|||||||
@@ -164,8 +164,8 @@ class TreeNode(Generic[NodeDataType]):
|
|||||||
class TreeControl(Generic[NodeDataType], Static, can_focus=True):
|
class TreeControl(Generic[NodeDataType], Static, can_focus=True):
|
||||||
DEFAULT_CSS = """
|
DEFAULT_CSS = """
|
||||||
TreeControl {
|
TreeControl {
|
||||||
background: $surface;
|
background: $panel;
|
||||||
color: $text-surface;
|
color: $text-panel;
|
||||||
height: auto;
|
height: auto;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user