From 3d573103b68b931cb3793d29d042c0c6e8d6a303 Mon Sep 17 00:00:00 2001 From: ocornut Date: Fri, 18 Sep 2020 20:42:05 +0200 Subject: [PATCH] Tables: Fixed lower clipping when using ImGuiTableFlags_NoHostExtendY. --- imgui_tables.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui_tables.cpp b/imgui_tables.cpp index c780f1f2..13fa9269 100644 --- a/imgui_tables.cpp +++ b/imgui_tables.cpp @@ -284,7 +284,7 @@ bool ImGui::BeginTableEx(const char* name, ImGuiID id, int columns_count, ImG table->InnerClipRect = (inner_window == outer_window) ? table->WorkRect : inner_window->ClipRect; table->InnerClipRect.ClipWith(table->WorkRect); // We need this to honor inner_width table->InnerClipRect.ClipWith(table->HostClipRect); - table->InnerClipRect.Max.y = (flags & ImGuiTableFlags_NoHostExtendY) ? table->WorkRect.Max.y : inner_window->ClipRect.Max.y; + table->InnerClipRect.Max.y = (flags & ImGuiTableFlags_NoHostExtendY) ? ImMin(table->InnerClipRect.Max.y, inner_window->WorkRect.Max.y) : inner_window->ClipRect.Max.y; table->BackgroundClipRect = table->InnerClipRect; table->RowPosY1 = table->RowPosY2 = table->WorkRect.Min.y; // This is needed somehow table->RowTextBaseline = 0.0f; // This will be cleared again by TableBeginRow()