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