You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using ImGuiTableFlags_ScrollY in a table, no horizontal space gets reserved for the vertical scroll bar, causing the end of the table content to be cut off.
I think the issue lies in line 1494 of imgui_tables.cpp:
If I change ImGuiTableFlags_ScrollX to ImGuiTableFlags_ScrollY here, the issue goes away, and this change makes sense to me since only a vertical scrollbar would need additional horizontal space.
Screenshots/Video:
Before change:
After change:
Minimal, Complete and Verifiable Example code:
// Here's some code anyone can copy and paste to reproduce your issueImGui::Begin("Table Issue", 0, ImGuiWindowFlags_AlwaysAutoResize);
// ImGui::TextUnformatted("<Extra widgets>");unsigned flags = ImGuiTableFlags_SizingFixedFit | ImGuiTableFlags_ScrollY;
if (ImGui::BeginTable("Table", 1, flags, ImVec2(0.0f, 100.0f)))
{
for (int i = 0; i < 100; ++i)
{
ImGui::TableNextColumn();
ImGui::Text("Row %02d - Loooooong text", i);
}
ImGui::EndTable();
}
ImGui::End();
The text was updated successfully, but these errors were encountered:
Thanks for reporting this.
I have pushed a fix : a31aa68
For clarity, it specifically relates to how the table reports its ideal contents size to the auto-resizing parent container.
The problem is a little big more complex than meet the eyes and it's not impossible we would need to get back to this.
One issue is that the reports bubbling up into parents may create one frame glitches, we could technically pre-compute expected visibility of scrollbar ahead to reduce issues in this case.
Version/Branch of Dear ImGui:
Version 1.90.8 WIP, Branch: master
Back-ends:
imgui_impl_glfw.cpp + imgui_impl_opengl3.cpp
Compiler, OS:
Linux + GCC 12
Full config/build information:
Details:
My Issue/Question:
When using ImGuiTableFlags_ScrollY in a table, no horizontal space gets reserved for the vertical scroll bar, causing the end of the table content to be cut off.
I think the issue lies in line 1494 of imgui_tables.cpp:
If I change ImGuiTableFlags_ScrollX to ImGuiTableFlags_ScrollY here, the issue goes away, and this change makes sense to me since only a vertical scrollbar would need additional horizontal space.
Screenshots/Video:
Before change:
After change:
Minimal, Complete and Verifiable Example code:
The text was updated successfully, but these errors were encountered: