Remove ViewContext::is_child
This commit is contained in:
parent
5157442703
commit
9e8f852afb
4 changed files with 42 additions and 75 deletions
|
@ -2833,16 +2833,6 @@ impl<'a, 'b, V: View> ViewContext<'a, 'b, V> {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn is_child(&self, view: impl Into<AnyViewHandle>) -> bool {
|
||||
let view = view.into();
|
||||
if self.window_id != view.window_id {
|
||||
return false;
|
||||
}
|
||||
self.ancestors(view.view_id)
|
||||
.skip(1) // Skip self id
|
||||
.any(|parent| parent == self.view_id)
|
||||
}
|
||||
|
||||
pub fn blur(&mut self) {
|
||||
let window_id = self.window_id;
|
||||
self.window_context.focus(window_id, None);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue