Fix layout explanation being hidden by multi-layer widgets

If the child widget has multiple layers (e.g. `Stack`), the layout explanation
would be partially hidden by the layers of the child widget. Just put the layout
explanation in its own layer to mitigate this.

Co-authored-by: Craig Watson <craig@watsons.ch>
This commit is contained in:
edwloef 2025-04-29 20:10:22 +02:00 committed by Héctor Ramón Jiménez
parent e163333161
commit 0cd82ccc11
No known key found for this signature in database
GPG key ID: 7CC46565708259A7

View file

@ -498,7 +498,9 @@ where
.widget
.draw(state, renderer, theme, style, layout, cursor, viewport);
explain_layout(renderer, self.color, layout);
renderer.with_layer(Rectangle::INFINITE, |renderer| {
explain_layout(renderer, self.color, layout);
});
}
fn mouse_interaction(