mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
9
sandbox/will/scrollbug.css
Normal file
9
sandbox/will/scrollbug.css
Normal file
@@ -0,0 +1,9 @@
|
||||
Screen {
|
||||
align: center middle;
|
||||
}
|
||||
|
||||
#test {
|
||||
border: solid white;
|
||||
background: blue;
|
||||
}
|
||||
|
||||
19
sandbox/will/scrollbug.py
Normal file
19
sandbox/will/scrollbug.py
Normal file
@@ -0,0 +1,19 @@
|
||||
from textual.app import App, ComposeResult
|
||||
from textual.containers import Container
|
||||
from textual.widgets import Header, Footer
|
||||
|
||||
|
||||
class ScrollApp(App):
|
||||
|
||||
BINDINGS = [("q", "quit", "QUIT")]
|
||||
CSS_PATH = "scrollbug.css"
|
||||
|
||||
def compose(self) -> ComposeResult:
|
||||
yield Header()
|
||||
yield Container(id="test")
|
||||
yield Footer()
|
||||
|
||||
|
||||
app = ScrollApp()
|
||||
if __name__ == "__main__":
|
||||
app.run()
|
||||
@@ -114,7 +114,9 @@ def arrange(
|
||||
for placement in layout_placements
|
||||
]
|
||||
).size
|
||||
placement_offset += styles._align_size(placement_size, size).clamped
|
||||
placement_offset += styles._align_size(
|
||||
placement_size, region.size
|
||||
).clamped
|
||||
|
||||
if placement_offset:
|
||||
layout_placements = [
|
||||
|
||||
Reference in New Issue
Block a user