From e9a7e73bbaacec886f9b39130428b81b7f95bf16 Mon Sep 17 00:00:00 2001 From: omar Date: Wed, 15 Nov 2017 23:42:18 +0100 Subject: [PATCH] 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). --- imgui.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/imgui.cpp b/imgui.cpp index 19eeda3a..088012bb 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -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; }