Fixed non-pixel aligned bounding box of window resize grip, / which triumphally led to any re-arrangement of operations inside the resize grip code outputting non-exact size_target values which led to unstable window position because clamping code uses size in a subtraction, etc etc. Lovely how a whole system can be made to act weird with a single bad input.

This commit is contained in:
omar 2017-11-08 22:32:22 +01:00
parent 2ab27be3de
commit 9ac8820ee2
1 changed files with 1 additions and 1 deletions

View File

@ -4386,7 +4386,7 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
// Manual resize
// Using the FlattenChilds button flag, we make the resize button accessible even if we are hovering over a child window
const ImVec2 br = window->Rect().GetBR();
const ImRect resize_rect(br - ImVec2(resize_corner_size * 0.75f, resize_corner_size * 0.75f), br);
const ImRect resize_rect(br - ImFloor(ImVec2(resize_corner_size * 0.75f, resize_corner_size * 0.75f)), br);
const ImGuiID resize_id = window->GetID("#RESIZE");
bool hovered, held;
ButtonBehavior(resize_rect, resize_id, &hovered, &held, ImGuiButtonFlags_FlattenChilds);