From 370de414ef4603140f793d13d231ff0b71f51dc3 Mon Sep 17 00:00:00 2001 From: ocornut Date: Sun, 13 Dec 2015 23:42:44 +0000 Subject: [PATCH] TreeNode(): Fixed horizontal spacing for layout to match Bullet() (followup to #414, #282) --- imgui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui.cpp b/imgui.cpp index 38e330e9..b128dc73 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -5594,7 +5594,7 @@ bool ImGui::CollapsingHeader(const char* label, const char* str_id, bool display } const float collapser_width = g.FontSize + (display_frame ? padding.x*2 : padding.x); - const float text_width = collapser_width + (label_size.x > 0.0f ? label_size.x + padding.x*2 : 0.0f); // Include collapser + const float text_width = g.FontSize + (label_size.x > 0.0f ? label_size.x + padding.x*2 : 0.0f); // Include collapser ItemSize(ImVec2(text_width, frame_height), text_base_offset_y); // For regular tree nodes, we arbitrary allow to click past 2 worth of ItemSpacing