Skip to content

Border / radius doesn't respect full Node size. #15502

Closed
@eidloi

Description

@eidloi

Bevy version

0.14.2

What you did

I use rounded borders on UI elements.

What went wrong

When there is not enough space for the entire Node to be visible, the node is squished. This is extremely visible with rounded borders, as the rounding gets distorted and remain fully on screen.

  • what were you expecting?

Node should be clipped

  • what actually happened?

Node get squished.

Additional information

This is with flex shrink: 0. I think rendering uses the visible clip rect as if it was the full UV 0-1 range, rather than clamping the UV to the visible portion.

The effect is clearly visible on the radio buttons in the gif below, but also notice the button corners remaining on-screen as well:

border_radius_squish

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-UIGraphical user interfaces, styles, layouts, and widgetsC-BugAn unexpected or incorrect behaviorD-StraightforwardSimple bug fixes and API improvements, docs, test and examplesS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions