Skip to content

Overflow does not work, instead parent nodes are resized #18933

Open
@gehud

Description

@gehud

Bevy version

0.16.0

Relevant system information

`AdapterInfo { name: "NVIDIA GeForce RTX 3050 Laptop GPU", vendor: 4318, device: 9634, device_type: DiscreteGpu, driver: "NVIDIA", driver_info: "566.36", backend: Vulkan }`

What you did

I wanted to make a scrollable view:

parent.spawn(Node {
    width: Val::Percent(100.0),
    height: Val::Percent(100.0),
    max_height: Val::Percent(100.0),
    flex_direction: FlexDirection::Column,
    overflow: Overflow::scroll_y(),
    ..default()
})

What went wrong

If there are few elements, then everything is fine. But when they overflow the node, then the parent nodes expand, although I specified the maximum height of 100%

Everything is fine:
Image

Now pay attention to the bottom:
Image

Additional information

Place in the repository:
https://github.com/gehud/bevy_launcher/blob/60f19e2d7bfd4ce347fc00e4f3acd516a6c8fa33/src/projects.rs#L411

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-UIGraphical user interfaces, styles, layouts, and widgetsC-BugAn unexpected or incorrect behaviorS-BlockedThis cannot move forward until something else changes

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions