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;
|
margin: 1;
|
||||||
padding: 0 1;
|
padding: 0 1;
|
||||||
transition: background 300ms linear;
|
transition: background 300ms linear;
|
||||||
|
min-width: 50;
|
||||||
}
|
}
|
||||||
|
|
||||||
TimerWidget.started {
|
TimerWidget.started {
|
||||||
|
|||||||
@@ -33,6 +33,8 @@ class Screen(Widget):
|
|||||||
|
|
||||||
CSS = """
|
CSS = """
|
||||||
Screen {
|
Screen {
|
||||||
|
color: $text-background;
|
||||||
|
background: $background;
|
||||||
layout: vertical;
|
layout: vertical;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -821,10 +821,14 @@ class Widget(DOMNode):
|
|||||||
# Adjust the region by the amount we just scrolled it, and convert to
|
# Adjust the region by the amount we just scrolled it, and convert to
|
||||||
# it's parent's virtual coordinate system.
|
# it's parent's virtual coordinate system.
|
||||||
region = (
|
region = (
|
||||||
region.translate(-scroll_offset)
|
(
|
||||||
.translate(-widget.scroll_offset)
|
region.translate(-scroll_offset)
|
||||||
.translate(container.virtual_region.offset)
|
.translate(-widget.scroll_offset)
|
||||||
).intersection(container.virtual_region)
|
.translate(container.virtual_region.offset)
|
||||||
|
)
|
||||||
|
.grow(container.styles.margin)
|
||||||
|
.intersection(container.virtual_region)
|
||||||
|
)
|
||||||
widget = container
|
widget = container
|
||||||
return scrolled
|
return scrolled
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user