mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
fix bug with layout updates
This commit is contained in:
@@ -27,6 +27,10 @@ class CenterApp(App):
|
||||
margin: 2 4;
|
||||
}
|
||||
|
||||
#sidebar.hidden {
|
||||
width: 0;
|
||||
}
|
||||
|
||||
Static {
|
||||
background: $panel;
|
||||
color: $text-panel;
|
||||
@@ -35,6 +39,9 @@ class CenterApp(App):
|
||||
|
||||
"""
|
||||
|
||||
def on_mount(self) -> None:
|
||||
self.bind("t", "toggle_class('#sidebar', 'hidden')")
|
||||
|
||||
def compose(self):
|
||||
yield Static("Sidebar", id="sidebar")
|
||||
yield Vertical(
|
||||
@@ -45,4 +52,4 @@ class CenterApp(App):
|
||||
)
|
||||
|
||||
|
||||
app = CenterApp()
|
||||
app = CenterApp(log_verbosity=3)
|
||||
|
||||
Reference in New Issue
Block a user