mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
tree fix
This commit is contained in:
@@ -24,6 +24,23 @@ App > Screen {
|
||||
|
||||
}
|
||||
|
||||
#tree-container {
|
||||
overflow-y: auto;
|
||||
height: 20;
|
||||
margin: 1 2;
|
||||
background: $panel;
|
||||
padding: 1 2;
|
||||
}
|
||||
|
||||
DirectoryTree {
|
||||
padding: 0 1;
|
||||
height: auto;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
DataTable {
|
||||
/*border:heavy red;*/
|
||||
/* tint: 10% green; */
|
||||
|
||||
@@ -6,7 +6,8 @@ from rich.text import Text
|
||||
from textual.app import App, ComposeResult
|
||||
from textual.reactive import Reactive
|
||||
from textual.widget import Widget
|
||||
from textual.widgets import Static, DataTable
|
||||
from textual.widgets import Static, DataTable, DirectoryTree
|
||||
from textual.layout import Vertical
|
||||
|
||||
CODE = '''
|
||||
from __future__ import annotations
|
||||
@@ -130,6 +131,7 @@ class BasicApp(App, css_path="basic.css"):
|
||||
classes="scrollable",
|
||||
),
|
||||
table,
|
||||
Widget(DirectoryTree("~/projects/textual"), id="tree-container"),
|
||||
Error(),
|
||||
Tweet(TweetBody(), classes="scrollbar-size-custom"),
|
||||
Warning(),
|
||||
|
||||
Reference in New Issue
Block a user