From d232be740ffa69ca4ae0da3d416aa118d24f0f08 Mon Sep 17 00:00:00 2001 From: Lucas Meurer Date: Wed, 25 Mar 2026 13:40:54 +0100 Subject: [PATCH] Fix bug in ui stack color blending (#8021) Co-authored-by: Emil Ernerfeldt --- crates/egui/src/ui_stack.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/crates/egui/src/ui_stack.rs b/crates/egui/src/ui_stack.rs index 4debd76bb..d72b3ea0b 100644 --- a/crates/egui/src/ui_stack.rs +++ b/crates/egui/src/ui_stack.rs @@ -265,10 +265,11 @@ impl UiStack { let mut total = Color32::TRANSPARENT; for node in self.iter() { let fill = node.frame().fill; - if fill.is_opaque() { - return fill; - } else if fill != Color32::TRANSPARENT { + if fill != Color32::TRANSPARENT { total = fill.blend(total); + if total.is_opaque() { + break; + } } } total