Window: Fixed InnerClipRect right-most coordinates using wrong padding setting (introduced in 1.71).

This commit is contained in:
omar 2019-06-17 17:03:54 +02:00
parent 342751c89e
commit 70fe409338
2 changed files with 2 additions and 1 deletions

View File

@ -42,6 +42,7 @@ Breaking Changes:
the new names and equivalent.
Other Changes:
- Window: Fixed InnerClipRect right-most coordinates using wrong padding setting (introduced in 1.71).
- ImDrawList: Fixed CloneOutput() helper crashing. (#1860) [@gviot]
- ImDrawListSlitter, ImDrawList::ChannelsSplit(), : Fixed an issue with merging draw commands between channel 0 and 1. (#2624)

View File

@ -5618,7 +5618,7 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
float top_border_size = (((flags & ImGuiWindowFlags_MenuBar) || !(flags & ImGuiWindowFlags_NoTitleBar)) ? style.FrameBorderSize : window->WindowBorderSize);
window->InnerClipRect.Min.x = ImFloor(0.5f + window->InnerRect.Min.x + ImMax(ImFloor(window->WindowPadding.x * 0.5f), window->WindowBorderSize));
window->InnerClipRect.Min.y = ImFloor(0.5f + window->InnerRect.Min.y + top_border_size);
window->InnerClipRect.Max.x = ImFloor(0.5f + window->InnerRect.Max.x - ImMax(ImFloor(window->WindowPadding.y * 0.5f), window->WindowBorderSize));
window->InnerClipRect.Max.x = ImFloor(0.5f + window->InnerRect.Max.x - ImMax(ImFloor(window->WindowPadding.x * 0.5f), window->WindowBorderSize));
window->InnerClipRect.Max.y = ImFloor(0.5f + window->InnerRect.Max.y - window->WindowBorderSize);
window->InnerClipRect.ClipWithFull(host_rect);