-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UI vertical layout inaccurate for TextNode #7488
Comments
Thanks for the repro. I can also reproduce with
and with bevy's latest |
This feels buggy, but I also have no idea what the expected behavior would be with both a To create a node spanning the window vertically, you can give it a position and size: style: Style {
position: UiRect {
left: Val::Px(0.0),
top: Val::Px(0.0),
..default()
},
size: Size {
width: Val::Auto,
height: Val::Percent(100.0),
},
..default()
}, |
I believe |
@dvogel Can you try setting |
For an absolutely positioned elementAssuming that
If I believe that this layout would work as intended if it was absolutely positioned, and this is probably the best fix for the end user. Alternatively if they want to stick to relative positioning, then a 1% bottom margin could be used instead of bottom position. For a relatively positioned elementThe behaviour should be:
However, there seems to be a bug in Taffy that applies both Confirmed against Taffy's <div id="test-root" style="height: 100px; width: 100px;">
<div style="width: 40px;top: 0px;bottom:10%"></div>
</div> |
With |
Wait, cross-repo and even cross-org "closes" works? I guess since I have permissions? Anyways, this isn't actually fixed until we release taffy 0.3 and then migrate Bevy to it. |
I can confirm that the absolutely positioned variant with an explicit
I feel a little silly here as my use of |
That actually is how it works in the underlying Taffy library. So it's understandable that you'd be confused. This probably ought to be documented better! |
Bevy version
Bevy v0.9.1
Rustc 1.66.1
Linux, debian/bookworm
What you did
The following code (also available with assets in this repro) is meant to render a text box from the top of the screen to the bottom of the screen. However it renders part of the text box underneath the window titlebar and leaves a gap between the bottom of the text box and the window border (screenshots below).
What went wrong
With two different window dimensions, you can see that the error is proportional to the height of the window:
Additional information
Other information that can be used to further reproduce or isolate the problem.
This commonly includes:
NodeBundle
but it didn't render at all (likely an error or misunderstanding on my part).The text was updated successfully, but these errors were encountered: