(&self, control: &dyn Element)
| 157 | //Internal |
| 158 | |
| 159 | pub fn apply_depth(&self, control: &dyn Element) { |
| 160 | let mut state = self.state.borrow_mut(); |
| 161 | control.set_depth(state.depth_idx + control.depth_offset()); |
| 162 | state.depth_idx += 1.0; |
| 163 | |
| 164 | // for child in control.as_ref().borrow().children.iter() { |
| 165 | // if let Some(widget) = child.widget() { |
| 166 | // self.apply_depth(widget.as_ref()); |
| 167 | // } |
| 168 | // } |
| 169 | } |
| 170 | |
| 171 | pub fn sync_depth(&self) { |
| 172 | self.state.borrow_mut().depth_idx = 0.0; |
no test coverage detected