Window: Fixed SetNextWindowSizeConstraints() with non-rounded positions making windows drift. (#2067, #2530)

This commit is contained in:
omar
2019-05-03 19:09:44 +02:00
parent 9c1f02a42c
commit 526e2303bc
3 changed files with 4 additions and 1 deletions

View File

@ -4648,6 +4648,8 @@ static ImVec2 CalcSizeAfterConstraint(ImGuiWindow* window, ImVec2 new_size)
g.NextWindowData.SizeCallback(&data);
new_size = data.DesiredSize;
}
new_size.x = ImFloor(new_size.x);
new_size.y = ImFloor(new_size.y);
}
// Minimum size