mirror of
https://github.com/emilk/egui.git
synced 2026-08-29 04:40:03 -04:00
Fix bug in ui stack color blending (#8021)
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
This commit is contained in:
@@ -265,10 +265,11 @@ impl UiStack {
|
|||||||
let mut total = Color32::TRANSPARENT;
|
let mut total = Color32::TRANSPARENT;
|
||||||
for node in self.iter() {
|
for node in self.iter() {
|
||||||
let fill = node.frame().fill;
|
let fill = node.frame().fill;
|
||||||
if fill.is_opaque() {
|
if fill != Color32::TRANSPARENT {
|
||||||
return fill;
|
|
||||||
} else if fill != Color32::TRANSPARENT {
|
|
||||||
total = fill.blend(total);
|
total = fill.blend(total);
|
||||||
|
if total.is_opaque() {
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
total
|
total
|
||||||
|
|||||||
Reference in New Issue
Block a user