bevyengine / bevyengine/bevy

9-slicing: variable width response?

Open
#12,443 2 comments 0 reactions 0 assignees View on GitHub
A-UI C-Bug S-Needs-Investigation
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

## Bevy version

0.13

## What went wrong

I'm not sure how to describe this. If you have a 9-sliced node it seems to have different apparent widths based on the height of the node.

In this image, the top panel ("wood bucket" has a min_height of 60 and you can see it appears to be longer than the panel below it ("fill level"):
![wood_bucket1](https://github.com/bevyengine/bevy/assets/106117615/2aa9af2a-b18a-432a-9a9f-14b0440b030c)

In this image, the name panel's min height has been increased to 85 and you can see it aligns with the description panel. If you drag the min height in a bevy inspector, the apparent width changes as you drag:
![9slice2](https://github.com/bevyengine/bevy/assets/106117615/190cd821-cab4-4525-aa70-fabf1ea8f1f3)

All other style properties are the same between these two examples.

I would expect the apparent width of the panel to not change as the height of the panel changes.

Note that the actual computed width of the panel is not changing. This is entirely visual.

Sorry for the yellow. I put that on there because it makes the difference more visible.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the report in Bevy 0.13 with a 9-sliced node, comparing panels at different min_height values and observing the result in the Bevy inspector. Trace the 9-slice UI or rendering path that determines apparent width, then verify that changing height no longer changes the visual width while the computed width remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.