Skip to content

texture sliced UI nodes are sized intrinsically since required components changes #16109

@ickshonpe

Description

@ickshonpe

Bevy version

main

What's wrong

UiImage requires Node which requires ContentSize which means all nodes with a UiImage are sized based on the size of the image.
To use texture slicing you have to add a ImageScaleMode component to a UiImage node. This means that texture slice nodes inherit the intrinsic sizing of UiImage nodes. But texture slicing is a method of resizing an image to fit a node, so it doesn't make sense for the size of the source image to be a constraint on the size of the target node.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-UIGraphical user interfaces, styles, layouts, and widgetsC-BugAn unexpected or incorrect behaviorD-ModestA "normal" level of difficulty; suitable for simple features or challenging fixesS-Needs-DesignThis issue requires design work to think about how it would best be accomplished

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions