optimize box

This commit is contained in:
Will McGugan
2022-09-13 14:33:06 +01:00
parent 45d1e1c7e1
commit e27f9f97c7

View File

@@ -111,11 +111,13 @@ def get_box(
) = BORDER_LOCATIONS[name]
styles: tuple[Style, ...] = (inner_style + style, outer_style + style)
inner, outer = styles
from_color = Style.from_color
styles += (
Style.from_color(styles[1].bgcolor, styles[0].color),
Style.from_color(styles[0].color, styles[0].bgcolor),
Style.from_color(styles[0].bgcolor, styles[1].color),
from_color(outer.bgcolor, inner.color),
from_color(inner.color, inner.bgcolor),
from_color(inner.bgcolor, outer.color),
)
return (