mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-11 21:13:02 +00:00
Reset visible bounds when painting an Overlay
element
Co-Authored-By: Max Brunsfeld <max@zed.dev>
This commit is contained in:
parent
6fec9e1f70
commit
3d4ff43f9e
1 changed files with 2 additions and 2 deletions
|
@ -30,13 +30,13 @@ impl Element for Overlay {
|
||||||
fn paint(
|
fn paint(
|
||||||
&mut self,
|
&mut self,
|
||||||
bounds: RectF,
|
bounds: RectF,
|
||||||
visible_bounds: RectF,
|
_: RectF,
|
||||||
size: &mut Self::LayoutState,
|
size: &mut Self::LayoutState,
|
||||||
cx: &mut PaintContext,
|
cx: &mut PaintContext,
|
||||||
) {
|
) {
|
||||||
let bounds = RectF::new(bounds.origin(), *size);
|
let bounds = RectF::new(bounds.origin(), *size);
|
||||||
cx.scene.push_stacking_context(None);
|
cx.scene.push_stacking_context(None);
|
||||||
self.child.paint(bounds.origin(), visible_bounds, cx);
|
self.child.paint(bounds.origin(), bounds, cx);
|
||||||
cx.scene.pop_stacking_context();
|
cx.scene.pop_stacking_context();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue