From bf88d6a329d5d45db5ca3b99274a7462d5caf3b4 Mon Sep 17 00:00:00 2001 From: ocornut Date: Fri, 6 Mar 2015 21:52:48 +0000 Subject: [PATCH] Minor tweak --- imgui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui.cpp b/imgui.cpp index c3c6929d..259b0fa5 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -6338,7 +6338,7 @@ static void ItemSize(ImVec2 size, ImVec2* adjust_vertical_offset) window->DC.CursorPosPrevLine = ImVec2(window->DC.CursorPos.x + size.x, window->DC.CursorPos.y); window->DC.CursorPos = ImVec2((float)(int)(window->Pos.x + window->DC.ColumnsStartX + window->DC.ColumnsOffsetX), (float)(int)(window->DC.CursorPos.y + line_height + g.Style.ItemSpacing.y)); - window->SizeContentsFit = ImMax(window->SizeContentsFit, ImVec2(window->DC.CursorPosPrevLine.x, window->DC.CursorPos.y) - window->Pos + ImVec2(0.0f, window->ScrollY)); + window->SizeContentsFit = ImMax(window->SizeContentsFit, ImVec2(window->DC.CursorPosPrevLine.x - window->Pos.x, window->DC.CursorPos.y + window->ScrollY - window->Pos.y)); window->DC.PrevLineHeight = line_height; window->DC.CurrentLineHeight = 0.0f;