This commit is contained in:
Will McGugan
2022-04-05 17:31:17 +01:00
parent 82c0bd877c
commit a27bbb9e28
4 changed files with 11 additions and 21 deletions

View File

@@ -32,7 +32,6 @@ App > Screen {
height: 8;
background: $primary-darken1;
color: $on-primary-darken1;
border-right: outer $primary-darken3;
}
@@ -46,7 +45,6 @@ App > Screen {
color: $on-primary-darken2;
background: $primary-darken2;
height: 3;
border: hkey $primary-darken3;
}
@@ -57,9 +55,8 @@ App > Screen {
}
Tweet {
height: 7;
height: 8;
max-width: 80;
margin: 1 2;
background: $background;
color: $on-background;
@@ -81,8 +78,6 @@ TweetBody {
#footer {
color: $on-accent2;
background: $accent2;
height: 1;
border-top: hkey $accent2-darken2;
}

View File

@@ -210,10 +210,9 @@ class Compositor:
log(" " * indent, widget, region)
# region += layout_offset
# Container region is minus border
container_region = region.shrink(widget.styles.gutter)
container_size = container_region.size
# Containers (widgets with layout) require adding children
if widget.layout is not None:
@@ -254,14 +253,14 @@ class Compositor:
# Add any scrollbars
for chrome_widget, chrome_region in widget._arrange_scrollbars(
container_region.size
container_size
):
map[chrome_widget] = RenderRegion(
chrome_region + container_region.origin + layout_offset,
order,
clip,
container_region.size,
container_region.size,
container_size,
container_size,
)
# Add the container widget, which will render a background
@@ -270,17 +269,13 @@ class Compositor:
order,
clip,
total_region.size,
container_region.size,
container_size,
)
else:
# Add the widget to the map
map[widget] = RenderRegion(
region + layout_offset,
order,
clip,
region.size,
container_region.size,
region + layout_offset, order, clip, region.size, container_size
)
indent -= 1

View File

@@ -113,8 +113,8 @@ class App(DOMNode):
self._refresh_required = False
self.design = ColorSystem(
primary="#005EA8",
secondary="#F59402",
primary="#1564bf",
secondary="#ff9800",
warning="#ffa000",
error="#C62828",
success="#558B2F",

View File

@@ -164,7 +164,7 @@ class ColorSystem:
("accent2", accent2),
]
# Colors names that have a dark varient
# Colors names that have a dark variant
DARK_SHADES = {"primary", "secondary"}
for name, color in COLORS:
@@ -183,7 +183,7 @@ class ColorSystem:
for fade in range(3):
text_color = shade_color.get_contrast_text(text_alpha)
if fade > 0:
text_color = text_color.blend(shade_color, fade * 0.2 + 0.15)
text_color = text_color.blend(shade_color, fade * 0.1 + 0.15)
on_name = f"on-{name}{shade_name}-fade{fade}"
else:
on_name = f"on-{name}{shade_name}"