mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
tweak default screen style
This commit is contained in:
@@ -6,6 +6,7 @@ TimerWidget {
|
||||
margin: 1;
|
||||
padding: 0 1;
|
||||
transition: background 300ms linear;
|
||||
min-width: 50;
|
||||
}
|
||||
|
||||
TimerWidget.started {
|
||||
|
||||
@@ -33,6 +33,8 @@ class Screen(Widget):
|
||||
|
||||
CSS = """
|
||||
Screen {
|
||||
color: $text-background;
|
||||
background: $background;
|
||||
layout: vertical;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
@@ -821,10 +821,14 @@ class Widget(DOMNode):
|
||||
# Adjust the region by the amount we just scrolled it, and convert to
|
||||
# it's parent's virtual coordinate system.
|
||||
region = (
|
||||
region.translate(-scroll_offset)
|
||||
.translate(-widget.scroll_offset)
|
||||
.translate(container.virtual_region.offset)
|
||||
).intersection(container.virtual_region)
|
||||
(
|
||||
region.translate(-scroll_offset)
|
||||
.translate(-widget.scroll_offset)
|
||||
.translate(container.virtual_region.offset)
|
||||
)
|
||||
.grow(container.styles.margin)
|
||||
.intersection(container.virtual_region)
|
||||
)
|
||||
widget = container
|
||||
return scrolled
|
||||
|
||||
|
||||
Reference in New Issue
Block a user