-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
inconsistent sizing between Button and ImageButton #6901
Comments
Yes. ImageButton() adds FramePadding over the passed size. It makes sense but I do agree it should be clarified in the documentation. The difference is (style.FramePadding * 2.0f) So those will be equivalent:
Those will also be equivalent:
|
Thank you. That was unexpected for me. If this is intended despite not very obvious (at least for me) behavior I wouldn't suggest to change calculations since many could rely on this sizing. Hope adding information about sizing to documentation would help future users. Feel free to close this ticket. |
What happened is the following:
Unlike e.g. I have now renamed the argument to |
Version/Branch of Dear ImGui:
Version: v1.89.9
Branch: https://github.com/thedmd/imgui/tree/layouts
Back-end/Renderer/Compiler/OS
Back-ends: imgui_impl_opengl3.h, imgui_impl_glfw.h
Compiler: msvc
Operating System: windows 10
My Issue/Question:
Hello. When displaying buttons with this code:
their sizes are different:
Screenshots/Video
Standalone, minimal, complete and verifiable example:
Is this expected behavior? If yes how should I correct size of the ImageButton to match size of regular Button?
The text was updated successfully, but these errors were encountered: