-
-
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
Odd animation-like autoresizing with Columns using ImGuiColumnsFlags_GrowParentContentsSize #2707
Comments
ImGuiColumnsFlags_GrowParentContentsSize
That's a side effect of the change in 1.71:
It's not however incorrect (actually more correct than it used to be, just more strange). Combining both flags without setting a known contents size is kinda contradictory and creates a feedback loop. Columns use all the available width, and If you use Those problems will be much more naturally/easily solved with the upcoming Tables (~Columns V2) api. (EDIT Please use github attachment for gif files and not external host, as requested by the contributing guidelines and issue template. If you use an external host you are actively preventing future users from understanding the context of your issue. Thank you!) |
Sorry, I must've missed the embed in the contributing guideline! And yeah, that actually does make a lot more sense 🤔 Thanks for the quick response! |
Generally if you enable horizontal scrolling the columns need to have a fixed (non-proportionally-stretching sizes) width. The column system currently only have "proportionally-stretching" columns. I'm hoping the new table api will make it in a test branch in August and hopefully in master before end of September. |
I figured out a good hack for my usecase: I calculate the size the item requires myself, and if it's larger than the current column's width, I reset the width to the item's value. And I'm definitely looking forward to it! Though don't stress yourself, you've done amazing work on this project and enabled me and others to work on their dream-projects! |
…ColumnFlags_*. (#125, #513, #913, #1204, #1444, #2142, #2707) Affected: ImGuiColumnsFlags_None, ImGuiColumnsFlags_NoBorder, ImGuiColumnsFlags_NoResize, ImGuiColumnsFlags_NoPreserveWidths, ImGuiColumnsFlags_NoForceWithinWindow, ImGuiColumnsFlags_GrowParentContentsSize. Added redirection enums. Did not add redirection type.
Closing this as Columns are a legacy features and Tables now handle this better. |
(you may also go to Demo>About Window, and click "Config/Build Information" to obtain a bunch of detailed information that you can paste here)
Version/Branch of Dear ImGui:
Version: 1.72
Branch: docking
Back-end/Renderer/Compiler/OS
Back-ends: imgui_impl_glfw.cpp + imgui_impl_opengl3.cpp
Compiler: CLang
Operating System: Arch Linux 64 Bit
My Issue/Question:
Having a window with an optional horizontal scrollbar, using the new columns-api with the
GrowParentContentsSize
flag causes a very odd behaviour.Here's code that reproduces it on my system:
Removing either the horizontal scrollbar from the window, or the flag from the columns fixes the issue.
and here's a video to show what it looks like:
The text was updated successfully, but these errors were encountered: