From b1b23d6ca9b960955fdb234ccc29cbf2db0f813d Mon Sep 17 00:00:00 2001 From: ocornut Date: Sun, 3 May 2015 13:52:53 +0100 Subject: [PATCH] Autofit cancel out one worth of vertical spacing for correct symmetry (group and tooltip already do that) --- imgui.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/imgui.cpp b/imgui.cpp index c7f14579..3aef30b9 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -3239,6 +3239,7 @@ bool ImGui::Begin(const char* name, bool* p_opened, const ImVec2& size_on_first_ size_auto_fit = ImClamp(window->SizeContents + style.AutoFitPadding, style.WindowMinSize, ImMax(style.WindowMinSize, g.IO.DisplaySize - style.AutoFitPadding)); if (size_auto_fit.y < window->SizeContents.y + style.AutoFitPadding.y) size_auto_fit.x += style.ScrollbarWidth; + size_auto_fit.y -= style.ItemSpacing.y; } // Handle automatic resize