diff --git a/src/view.rs b/src/view.rs index 8a2be7cf..96c749c5 100644 --- a/src/view.rs +++ b/src/view.rs @@ -404,12 +404,14 @@ impl View for Box { pub fn default_compute_layout(id: ViewId, cx: &mut ComputeLayoutCx) -> Option { let mut layout_rect: Option = None; for child in id.children() { + if !child.style_has_hidden() { let child_layout = cx.compute_view_layout(child); - if let Some(child_layout) = child_layout { - if let Some(rect) = layout_rect { - layout_rect = Some(rect.union(child_layout)); - } else { - layout_rect = Some(child_layout); + if let Some(child_layout) = child_layout { + if let Some(rect) = layout_rect { + layout_rect = Some(rect.union(child_layout)); + } else { + layout_rect = Some(child_layout); + } } } }