From 39979d47531d6125b948becead089bba8a59e6e4 Mon Sep 17 00:00:00 2001 From: bflatastic Date: Sat, 17 Oct 2026 13:20:19 +0700 Subject: [PATCH] Tests: the floating-panel test skips fills that paint nothing (#2421) --- crates/ui-egui/src/panel_docking_tests.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/ui-egui/src/panel_docking_tests.rs b/crates/ui-egui/src/panel_docking_tests.rs index 9eccbf0e8..f0a556d51 100644 --- a/crates/ui-egui/src/panel_docking_tests.rs +++ b/crates/ui-egui/src/panel_docking_tests.rs @@ -623,10 +623,10 @@ fn floating_group_paints_an_opaque_background() { app.run("window.panel.float", json!({"panel":"properties","x":400,"y":200,"width":300,"height":420})).unwrap(); let h = harness(app, vec2(1280.0, 800.0)); // Paint order: the last big filled rectangle over a point decides what the user sees there - // (outlines and small widgets don't count). + // (outlines, small widgets and fully transparent fills, which paint nothing, don't count). fn topmost(shape: &egui::Shape, p: Pos2, found: &mut Option) { match shape { - egui::Shape::Rect(r) if r.rect.contains(p) && r.rect.width() >= 200.0 && r.stroke.is_empty() => *found = Some(r.fill), + egui::Shape::Rect(r) if r.rect.contains(p) && r.rect.width() >= 200.0 && r.stroke.is_empty() && r.fill.a() > 0 => *found = Some(r.fill), egui::Shape::Vec(v) => v.iter().for_each(|s| topmost(s, p, found)), _ => {} }