wip: picker

co-authored-by: nathan <nathan@zed.dev>
co-authored-by: max <max@zed.dev>
This commit is contained in:
Mikayla 2023-11-06 17:09:38 -08:00
parent 3c93b585ab
commit 85000eba81
No known key found for this signature in database
21 changed files with 460 additions and 278 deletions

View file

@ -1698,8 +1698,8 @@ impl<'a, V: 'static> ViewContext<'a, V> {
&mut self.window_cx
}
pub fn stack<R>(&mut self, order: u32, f: impl FnOnce(&mut Self) -> R) -> R {
self.window.z_index_stack.push(order);
pub fn with_z_index<R>(&mut self, z_index: u32, f: impl FnOnce(&mut Self) -> R) -> R {
self.window.z_index_stack.push(z_index);
let result = f(self);
self.window.z_index_stack.pop();
result