mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
fix for scrollview space
This commit is contained in:
@@ -20,10 +20,10 @@ class MyApp(App):
|
||||
async def add_content():
|
||||
table = Table(title="Demo")
|
||||
|
||||
for i in range(40):
|
||||
for i in range(20):
|
||||
table.add_column(f"Col {i + 1}", style="magenta")
|
||||
for i in range(200):
|
||||
table.add_row(*[f"cell {i},{j}" for j in range(40)])
|
||||
for i in range(100):
|
||||
table.add_row(*[f"cell {i},{j}" for j in range(20)])
|
||||
|
||||
await body.update(table)
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ from rich.padding import Padding
|
||||
from rich.text import Text
|
||||
|
||||
from textual.app import App
|
||||
from textual import events
|
||||
from textual.reactive import Reactive
|
||||
from textual.views import GridView
|
||||
from textual.widget import Widget
|
||||
|
||||
@@ -17,7 +17,7 @@ class MyApp(App):
|
||||
"""Create and dock the widgets."""
|
||||
|
||||
# A scrollview to contain the markdown file
|
||||
body = ScrollView()
|
||||
body = ScrollView(gutter=1)
|
||||
|
||||
# Header / footer / dock
|
||||
await self.view.dock(Header(), edge="top")
|
||||
|
||||
Reference in New Issue
Block a user