mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
exclude invisible widgets
This commit is contained in:
@@ -9,4 +9,5 @@ Static {
|
||||
height: 100%;
|
||||
margin: 2 4;
|
||||
min-width: 30;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
@@ -2,9 +2,14 @@ from textual.app import App
|
||||
from textual.widgets import Static
|
||||
|
||||
|
||||
class Clickable(Static):
|
||||
def on_click(self):
|
||||
self.app.bell()
|
||||
|
||||
|
||||
class SpacingApp(App):
|
||||
def compose(self):
|
||||
yield Static()
|
||||
yield Clickable()
|
||||
|
||||
|
||||
app = SpacingApp(css_path="spacing.css")
|
||||
|
||||
Reference in New Issue
Block a user