(&self, control: &dyn Element)
| 120 | //Internal |
| 121 | |
| 122 | pub fn apply_depth(&self, control: &dyn Element) { |
| 123 | let mut state = self.state.borrow_mut(); |
| 124 | control.set_depth(state.depth_idx + control.depth_offset()); |
| 125 | state.depth_idx += 1.0; |
| 126 | |
| 127 | // for child in control.as_ref().borrow().children.iter() { |
| 128 | // if let Some(widget) = child.widget() { |
| 129 | // self.apply_depth(widget.as_ref()); |
| 130 | // } |
| 131 | // } |
| 132 | } |
| 133 | |
| 134 | pub fn sync_depth(&self) { |
| 135 | self.state.borrow_mut().depth_idx = 0.0; |
no test coverage detected