From 2a05ef9601bca560e68f9a16ff1875cfed33e0ea Mon Sep 17 00:00:00 2001 From: Cory Forsstrom Date: Mon, 24 Jul 2023 09:26:24 -0700 Subject: Don't clip raw overlay bounds User interface wraps the overlay in `overlay::Nested`. Clipping here w/ the base Nested overlay always clipped at (0, 0) position instead of the correct position of the child overlay. It's clipped properly already within `Nested::draw`. --- runtime/src/user_interface.rs | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'runtime') diff --git a/runtime/src/user_interface.rs b/runtime/src/user_interface.rs index e31ea98f..8a936b98 100644 --- a/runtime/src/user_interface.rs +++ b/runtime/src/user_interface.rs @@ -513,17 +513,13 @@ where renderer, ); - let overlay_bounds = layout.bounds(); - - renderer.with_layer(overlay_bounds, |renderer| { - overlay.draw( - renderer, - theme, - style, - Layout::new(layout), - cursor, - ); - }); + overlay.draw( + renderer, + theme, + style, + Layout::new(layout), + cursor, + ); if cursor .position() -- cgit