Fix dock resizing

This commit is contained in:
Mikayla 2023-08-16 19:47:54 -07:00
parent 3074455386
commit 2f16147055
No known key found for this signature in database
10 changed files with 170 additions and 52 deletions

View file

@ -577,6 +577,14 @@ impl AppContext {
}
}
pub fn optional_global<T: 'static>(&self) -> Option<&T> {
if let Some(global) = self.globals.get(&TypeId::of::<T>()) {
Some(global.downcast_ref().unwrap())
} else {
None
}
}
pub fn upgrade(&self) -> App {
App(self.weak_self.as_ref().unwrap().upgrade().unwrap())
}