Improve border parsing in themes

The `top`, `left`, `bottom` and `right` fields are optional.
If none are specified, then they are all set to true.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Max Brunsfeld
2021-08-04 17:19:42 -07:00
co-authored by Nathan Sobo
parent 522fac9690
commit d37a98782e
4 changed files with 43 additions and 19 deletions
+1 -5
View File
@@ -444,11 +444,7 @@ impl Renderer {
border_right: border_width * (quad.border.right as usize as f32),
border_bottom: border_width * (quad.border.bottom as usize as f32),
border_left: border_width * (quad.border.left as usize as f32),
border_color: quad
.border
.color
.unwrap_or(Color::transparent_black())
.to_uchar4(),
border_color: quad.border.color.to_uchar4(),
corner_radius: quad.corner_radius * scene.scale_factor(),
};
unsafe {