diff --git a/src/views/tab.rs b/src/views/tab.rs index 6a1eed8c..61201e03 100644 --- a/src/views/tab.rs +++ b/src/views/tab.rs @@ -126,7 +126,9 @@ impl View for Tab { fn style_pass(&mut self, cx: &mut StyleCx<'_>) { for (i, child) in self.id.children().into_iter().enumerate() { - cx.style_view(child); + if i == self.active { + cx.style_view(child); + } let child_view = child.state(); let mut child_view = child_view.borrow_mut(); child_view.combined_style = child_view.combined_style.clone().set(