tweak default screen style

This commit is contained in:
Will McGugan
2022-08-19 11:28:13 +01:00
parent 6a22c96a9e
commit a6e4db6ff2
3 changed files with 11 additions and 4 deletions

View File

@@ -6,6 +6,7 @@ TimerWidget {
margin: 1;
padding: 0 1;
transition: background 300ms linear;
min-width: 50;
}
TimerWidget.started {

View File

@@ -33,6 +33,8 @@ class Screen(Widget):
CSS = """
Screen {
color: $text-background;
background: $background;
layout: vertical;
overflow-y: auto;
}

View File

@@ -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