mirror of
https://github.com/ocornut/imgui.git
synced 2026-11-10 19:03:30 +00:00
Regression with Columns() + AlwaysAutoResize between 1.51 and 1.53 #1444
Labels
No labels
accidentally closed
android
backends
bug
building
clipper
coloredit
color spaces
cplusplus
data types
demo
disabled
doc
docking
dpi
drag drop
drawing/drawlist
dropped
dx12
enhancement
focus
font/text
gallery
help wanted
idle/power saving
ime
in progress
inputs
inputtext
internals
label/id and id stack
language bindings
layout
linux/bsd
menus
multi-contexts
multi-threading
multi-viewports
nav
news/info
opengl
optimization
osx/ios
overlap
plot/graph
popups
question
scrolling
selection
settings
sliders/drags
style
tables/columns
tabs
test wanted
tools
tooltips
tree
tricks & tips
useful widgets
vulkan
web
window pos/depth
window sizing
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ocornut/imgui#1444
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hello,
I migrated some applications using ImGui from version 1.51 to latest 1.53, and I am facing a little bug related to tooltips using
ImGuiWindowFlags_AlwaysAutoResizeflag when drawing columns inside.In the latest version 1.53, the tooltips are truncated, as if they were considering only the first row and not the 3 columns which inside :
Here is a source code to repro :
In version 1.51, it was working well.
Best regards,
The problem relates to that change:
"Columns: Fixed the right-most column from registering its content width to the parent window, which led to various issues when using auto-resizing window or e.g. horizonal scrolling. (#519, #125, #913)"
Commit
ocornut/imgui@1c83b073c6The old logic was unfortunately causing way too much trouble, e.g. moving the right column would tend to lead into into a feedback loop, and it was actually related to a bug which would perform nicely in your use case (only the right-most column was extending the contents sizes, and since you are positioning all other offsets this is all you need. But if you don't set the offset it wouldn't make much sense).
Right now one workaround is to do:
ImGui::SetNextWindowContentWidth(300)But it is a regression since you don't get automatic resizing.
I'm not sure what to do about it right now. I can expose something similar to the old behavior in the
imgui_internal.hBeginColumns()API if that would help you in the meanwhile?Thanks for your quick reply.
I am interested in internal API exposing the old behaviour. Thanks !
As discussed, I'm adding a temporary internal.h flag
ImGuiColumnsFlags_GrowParentContentsSizethat you can use with theBeginColumns/EndColumns. This API is not publicly exposed yet because I'm waiting until we add new features to columns before, but it should become the columns 2.0 api eventually.The behavior is really odd because the "maximum cursor X position" bleeds outside of columns, affecting the parent window resize behavior, but the columns themselves aren't resized. It worked in a few very specific cases like yours. You may also use
SetNextWindowContentWidth()if needed.I'll keep all of this in mind when redesigning the Columns (#125) in the future.
Test code:
It works like a charm with 2 lines modified, thanks !