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

Confusion About horizontal_centered Behavior in egui #5731

Open
shadow3aaa opened this issue Feb 19, 2025 · 0 comments
Open

Confusion About horizontal_centered Behavior in egui #5731

shadow3aaa opened this issue Feb 19, 2025 · 0 comments

Comments

@shadow3aaa
Copy link

shadow3aaa commented Feb 19, 2025

hi there

I have a question regarding the behavior of the horizontal_centered layout in egui. According to the documentation, the behavior of "horizontal_centered" is clearly defined, and it describes centering the entire layout vertically after a horizontal layout. However, this behavior seems to conflict with the typical usage of "horizontal," which is commonly understood to refer to centering along the X-axis.

My understanding is that horizontal_centered in egui means "first do horizontal layout, then center the entire layout vertically," which results in vertical centering instead. This behavior, while explicitly described in the documentation, seems counterintuitive given the usual meaning of "horizontal."

Would it be possible to revert this to the more common meaning of horizontal centering, or perhaps consider a more descriptive name to avoid confusion for users who might expect the traditional behavior?

Thanks in advance!

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

No branches or pull requests

1 participant