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:
parent
6b26965074
commit
444417203b
4 changed files with 50 additions and 41 deletions
|
@ -150,6 +150,7 @@ impl Dock {
|
|||
cx: &mut RenderContext<Workspace>,
|
||||
) -> Option<ElementBox> {
|
||||
let style = &theme.workspace.dock;
|
||||
|
||||
self.position
|
||||
.visible()
|
||||
.filter(|current_anchor| *current_anchor == anchor)
|
||||
|
|
|
@ -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(),
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue