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; margin: 1;
padding: 0 1; padding: 0 1;
transition: background 300ms linear; transition: background 300ms linear;
min-width: 50;
} }
TimerWidget.started { TimerWidget.started {

View File

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

View File

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