Skip to content
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

Horizontal layout vertically offsets child UIs #5535

Open
clembu opened this issue Dec 29, 2024 · 1 comment
Open

Horizontal layout vertically offsets child UIs #5535

clembu opened this issue Dec 29, 2024 · 1 comment
Labels
bug Something is broken

Comments

@clembu
Copy link

clembu commented Dec 29, 2024

Describe the bug

When laying out horizontally a series of allocated vertical layouts, the child uis are offset and un-aligned.

To Reproduce
Steps to reproduce the behavior:

  1. Clone the reproduction repo https://github.com/clembu/egui_horizontal_offset_bug_reproduction
  2. Run the executable: cargo run
  3. ----> The children are vertically offset

Expected behavior
The lists are aligned horizontally, as they are all the same size.

Screenshots
A screenshot of the bug

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser: N/A
  • Version: Windows 24H2 Build 26100.2605
@clembu clembu added the bug Something is broken label Dec 29, 2024
@clembu
Copy link
Author

clembu commented Dec 29, 2024

It's probably worth mentioning:

This only happens if the child ui is allocated with not enough vertical space, therefore having to grow.

When allocated with vec2(arbitrary_width, ui.available_size().y), the problem does not occur.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken
Projects
None yet
Development

No branches or pull requests

1 participant