fix refresh

This commit is contained in:
Will McGugan
2021-12-13 10:18:01 +00:00
parent f40b339888
commit 485c1bdfe1
12 changed files with 42 additions and 18 deletions

View File

@@ -11,10 +11,14 @@ App > DockView {
height: 1fr;
layer: panels;
border-right: outer #09312e;
offset-x: -50%;
offset-x: -100%;
transition: offset-x 1.2s in_cubic 200ms, offset-y 1s linear;
}
#sidebar.-active {
offset-x: 0;
}
#header {
text: on #173f5f;
dock-group: header;

View File

@@ -5,16 +5,17 @@ from textual.widget import Widget
class BasicApp(App):
"""A basic app demonstrating CSS"""
def on_mount(self) -> None:
"""Build layout here."""
def on_load(self):
self.bind("t", "toggle('#sidebar', '-active')")
self.view.mount(
def on_mount(self):
"""Build layout here."""
self.mount(
header=Widget(),
content=Widget(),
footer=Widget(),
sidebar=Widget(),
)
self.panic(self.query("#sidebar").first().styles)
BasicApp.run(log="textual.log", css_file="basic.css")
BasicApp.run(log="textual.log", css_file="basic.css", log_verbosity=3)