Fix border rendering of transparent Container

Fixes #452
This commit is contained in:
Héctor Ramón Jiménez 2020-07-18 03:05:14 +02:00
parent 4030326a35
commit 9b778006ce

View File

@ -56,10 +56,7 @@ pub(crate) fn background(
bounds: Rectangle, bounds: Rectangle,
style: &container::Style, style: &container::Style,
) -> Option<Primitive> { ) -> Option<Primitive> {
if style.background.is_none() && style.border_width > 0 { if style.background.is_some() || style.border_width > 0 {
return None;
}
Some(Primitive::Quad { Some(Primitive::Quad {
bounds, bounds,
background: style background: style
@ -69,4 +66,7 @@ pub(crate) fn background(
border_width: style.border_width, border_width: style.border_width,
border_color: style.border_color, border_color: style.border_color,
}) })
} else {
None
}
} }