Left widget not centered when using nested layouts in egui #7635
-
Beta Was this translation helpful? Give feedback.
Answered by
justincredible
Oct 18, 2025
Replies: 1 comment 1 reply
-
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
nczyw
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


The left widget is centered in the UI area allocated at the time it is added. The vertical UI cannot fit in this allocation when the second (and then the third) middle widget is added, so more area is allocated. Then when the right widget is added it is centered in the latest allocation.
If you were expecting this:
You'll need to do a sizing pass to get the maximum height of the allocated area and then allocate that before adding the left widget like so: