Autofit cancel out one worth of vertical spacing for correct symmetry (group and tooltip already do that)

This commit is contained in:
ocornut 2015-05-03 13:52:53 +01:00
parent 0ca7926b94
commit b1b23d6ca9

View File

@ -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