Menus: fixed top-level menu from not consistently using style.PopupRounding. (#4788)

+ Stack tool default size.
This commit is contained in:
ocornut
2021-12-21 15:05:10 +01:00
parent 4bad852a78
commit 612b787b0d
3 changed files with 6 additions and 1 deletions

View File

@ -7050,7 +7050,9 @@ bool ImGui::BeginMenuEx(const char* label, const char* icon, bool enabled)
if (menu_is_open)
{
SetNextWindowPos(popup_pos, ImGuiCond_Always); // Note: this is super misleading! The value will serve as reference for FindBestWindowPosForPopup(), not actual pos.
PushStyleVar(ImGuiStyleVar_ChildRounding, style.PopupRounding); // First level will use _PopupRounding, subsequent will use _ChildRounding
menu_is_open = BeginPopupEx(id, flags); // menu_is_open can be 'false' when the popup is completely clipped (e.g. zero size display)
PopStyleVar();
}
else
{