Display::None
propagation bug
#16904
Labels
A-UI
Graphical user interfaces, styles, layouts, and widgets
C-Bug
An unexpected or incorrect behavior
S-Ready-For-Implementation
This issue is ready for an implementation PR. Go for it!
Bevy version
Main
What you did
Added red outlines to the innermost node of Bevy's
display_and_visibility
example.cargo run --example display_and_visibility
Without
Display::None
set:With
Display::None
set on the innermost node:With
Display::None
set on the outermost node:What went wrong
During layout recomputation if a node is found with
Display::None
set, that node and all its descendants are given a zero size.This means most systems ignore those nodes since you can't mouse-over or draw inside a zero-sized element.
However zero-sized nodes can have outlines and outlines extraction only checks the local
Display::None
value for the outlined node and not theDisplay
value of its ancestors. Which is why in3
there is a visible outline around a UI node that should be removed from the layout and shouldn't even have a position to draw an outline around.The text was updated successfully, but these errors were encountered: