mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Layer scroll fix (#2196)
* fix scroll spacing * fix and snapshot * changelog
This commit is contained in:
31
tests/snapshot_tests/snapshot_apps/dock_scroll.py
Normal file
31
tests/snapshot_tests/snapshot_apps/dock_scroll.py
Normal file
@@ -0,0 +1,31 @@
|
||||
from textual.app import App
|
||||
from textual.widgets import Header, Label, Footer
|
||||
|
||||
|
||||
class TestApp(App):
|
||||
BINDINGS = [("ctrl+q", "app.quit", "Quit")]
|
||||
CSS = """
|
||||
|
||||
Label {
|
||||
border: solid red;
|
||||
}
|
||||
Footer {
|
||||
height: 4;
|
||||
}
|
||||
"""
|
||||
|
||||
def compose(self):
|
||||
text = (
|
||||
"this is a sample sentence and here are some words".replace(" ", "\n") * 2
|
||||
)
|
||||
yield Header()
|
||||
yield Label(text)
|
||||
yield Footer()
|
||||
|
||||
def on_mount(self):
|
||||
self.dark = False
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
app = TestApp()
|
||||
app.run()
|
||||
Reference in New Issue
Block a user