Move workspace overlay elements into an actual overlay in order to get proper stacking context depths

Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
This commit is contained in:
K Simmons 2022-09-09 18:17:17 -07:00
parent 6b26965074
commit 444417203b
4 changed files with 50 additions and 41 deletions

View file

@ -2618,16 +2618,27 @@ impl View for Workspace {
)
.boxed()
})
.with_children(self.dock.render(&theme, DockAnchor::Expanded, cx))
.with_children(self.modal.as_ref().map(|m| {
ChildView::new(m)
.contained()
.with_style(theme.workspace.modal)
.aligned()
.top()
.boxed()
}))
.with_children(self.render_notifications(&theme.workspace))
.with_child(
Overlay::new(
Stack::new()
.with_children(self.dock.render(
&theme,
DockAnchor::Expanded,
cx,
))
.with_children(self.modal.as_ref().map(|m| {
ChildView::new(m)
.contained()
.with_style(theme.workspace.modal)
.aligned()
.top()
.boxed()
}))
.with_children(self.render_notifications(&theme.workspace))
.boxed(),
)
.boxed(),
)
.flex(1.0, true)
.boxed(),
)