bevyengine / bevyengine/bevy

A UI node size of zero shouldn't be used as a proxy to indicate that a node has `Display::None` set

Open
#15,045 2 comments 1 reaction 0 assignees View on GitHub
A-UI C-Bug C-Feature D-Straightforward S-Needs-Design
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## What problem does this solve or what need does it fill?

When a UI node is set to `Display::None`, the node is meant to be ignored and the UI is meant to behave as though it doesn't exist in the layout. To signal this at the moment we set the size field of its `Node` component to zero and add an empty clipping rect.

This isn't quite sufficient though. For instance with outlines, even a zero sized node can have an outline drawn around it.

## What solution would you like?

Adding a bool field to `Node` called `ignore` and setting it to true where `Display::None` is applied would be enough for now.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.