Replace foreground layers with stacking contexts

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra
2021-08-30 17:19:03 +02:00
co-authored by Nathan Sobo
parent 171627b63a
commit 87cd668a33
2 changed files with 64 additions and 33 deletions
+2 -2
View File
@@ -29,9 +29,9 @@ impl Element for Overlay {
fn paint(&mut self, bounds: RectF, size: &mut Self::LayoutState, cx: &mut PaintContext) {
let bounds = RectF::new(bounds.origin(), *size);
cx.scene.push_foreground_layer(Some(bounds));
cx.scene.push_stacking_context(None);
self.child.paint(bounds.origin(), cx);
cx.scene.pop_layer();
cx.scene.pop_stacking_context();
}
fn dispatch_event(