Windows with MenuBar have a larger minimum height to avoid artefacts (I fixed most of the vertical/horizontal artefacts, but the ones in rounded corners were too hard to fix).

This commit is contained in:
omar 2017-11-15 23:42:18 +01:00
parent f36037b384
commit e9a7e73bba

View File

@ -4012,7 +4012,10 @@ static ImVec2 CalcSizeFullWithConstraint(ImGuiWindow* window, ImVec2 new_size)
}
}
if (!(window->Flags & (ImGuiWindowFlags_ChildWindow | ImGuiWindowFlags_AlwaysAutoResize)))
{
new_size = ImMax(new_size, g.Style.WindowMinSize);
new_size.y = ImMax(new_size.y, window->TitleBarHeight() + window->MenuBarHeight() + ImMax(0.0f, g.Style.WindowRounding - 1.0f)); // Reduce artifacts with very small windows
}
return new_size;
}