From 2f2134780369387d66c41acf77e8727b3bd0eca6 Mon Sep 17 00:00:00 2001 From: ocornut Date: Sun, 5 Jul 2015 16:37:49 -0600 Subject: [PATCH] CollapsingHeader() fixed label rendering outside in columns context where cliprect max isn't aligned with header --- imgui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui.cpp b/imgui.cpp index 876fc8a5c..c47241bf4 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -5551,7 +5551,7 @@ bool ImGui::CollapsingHeader(const char* label, const char* str_id, bool display const char log_prefix[] = "\n##"; LogText(bb.Min + style.FramePadding, log_prefix, log_prefix+3); } - RenderText(bb.Min + style.FramePadding + ImVec2(g.FontSize + style.FramePadding.x*2,0), label); + RenderTextClipped(bb.Min + style.FramePadding + ImVec2(g.FontSize + style.FramePadding.x*2,0), bb.Max, label, NULL, &label_size); if (g.LogEnabled) { const char log_suffix[] = "##";