Columns: Separator: Fixed a bug where non-visible separators within columns would alter the next row position differently than visible ones.

Fixed rounding issues also leading to change of ScrollMax depending on visible items (in particular negative coordinate would be rounded differently)
This commit is contained in:
omar
2019-09-16 19:03:20 +02:00
parent b05f6f6f50
commit 3dcf323c35
3 changed files with 7 additions and 2 deletions

View File

@ -1261,7 +1261,10 @@ void ImGui::SeparatorEx(ImGuiSeparatorFlags flags)
if (!ItemAdd(bb, 0))
{
if (columns)
{
PopColumnsBackground();
columns->LineMinY = window->DC.CursorPos.y;
}
return;
}
@ -5624,7 +5627,7 @@ bool ImGui::ListBoxHeader(const char* label, int items_count, int height_in_item
// We include ItemSpacing.y so that a list sized for the exact number of items doesn't make a scrollbar appears. We could also enforce that by passing a flag to BeginChild().
ImVec2 size;
size.x = 0.0f;
size.y = GetTextLineHeightWithSpacing() * height_in_items_f + style.FramePadding.y * 2.0f;
size.y = ImFloor(GetTextLineHeightWithSpacing() * height_in_items_f + style.FramePadding.y * 2.0f);
return ListBoxHeader(label, size);
}