From 7959fbe992a60567d8c88afa5506b7825266f107 Mon Sep 17 00:00:00 2001 From: ocornut Date: Sun, 5 Jul 2015 16:35:41 -0600 Subject: [PATCH] AA branch: CollapsingHeader() rounding down half window padding --- imgui.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/imgui.cpp b/imgui.cpp index 8e7e80be8..876fc8a5c 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -5513,8 +5513,8 @@ bool ImGui::CollapsingHeader(const char* label, const char* str_id, bool display ImRect bb = ImRect(pos_min, ImVec2(pos_max.x, pos_min.y + label_size.y)); if (display_frame) { - bb.Min.x -= window_padding.x*0.5f - 1; - bb.Max.x += window_padding.x*0.5f - 1; + bb.Min.x -= (float)(int)(window_padding.x*0.5f) - 1; + bb.Max.x += (float)(int)(window_padding.x*0.5f) - 1; bb.Max.y += style.FramePadding.y * 2; }