Internals: Layout: maintain two content sizes, optionally writing to IdealMaxPos to distinguish used from ideal size, later is used for auto-fit. Unused in this commit, should be no-op. (#3414)

# Conflicts:
#	imgui.cpp
This commit is contained in:
ocornut
2021-01-14 15:48:28 +01:00
parent 6470681d87
commit 6af92b05bf
4 changed files with 37 additions and 25 deletions

View File

@ -1614,7 +1614,7 @@ bool ImGui::BeginCombo(const char* label, const char* preview_value, ImGuiComboF
if (popup_window->WasActive)
{
// Always override 'AutoPosLastDirection' to not leave a chance for a past value to affect us.
ImVec2 size_expected = CalcWindowExpectedSize(popup_window);
ImVec2 size_expected = CalcWindowNextAutoFitSize(popup_window);
if (flags & ImGuiComboFlags_PopupAlignLeft)
popup_window->AutoPosLastDirection = ImGuiDir_Left; // "Below, Toward Left"
else