Skip to content

Commit

Permalink
TextUnformatted() fixed clipping bug in the large-text path when hori…
Browse files Browse the repository at this point in the history
…zontal scroll has been applied (#692, #246)
  • Loading branch information
ocornut committed Jun 12, 2016
1 parent d791869 commit 9f21c71
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5310,7 +5310,7 @@ void ImGui::TextUnformatted(const char* text, const char* text_end)
// Lines to render
if (line < text_end)
{
ImRect line_rect(pos, pos + ImVec2(GetWindowWidth(), line_height));
ImRect line_rect(pos, pos + ImVec2(FLT_MAX, line_height));
while (line < text_end)
{
const char* line_end = strchr(line, '\n');
Expand Down Expand Up @@ -9675,6 +9675,7 @@ void ImGui::ShowMetricsWindow(bool* p_open)
if (!ImGui::TreeNode(window, "%s '%s', %d @ 0x%p", label, window->Name, window->Active || window->WasActive, window))
return;
NodeDrawList(window->DrawList, "DrawList");
ImGui::BulletText("Size: (%.1f,%.1f), SizeContents (%.1f,%.1f)", window->Size.x, window->Size.y, window->SizeContents.x, window->SizeContents.y);
if (window->RootWindow != window) NodeWindow(window->RootWindow, "RootWindow");
if (window->DC.ChildWindows.Size > 0) NodeWindows(window->DC.ChildWindows, "ChildWindows");
ImGui::BulletText("Storage: %d bytes", window->StateStorage.Data.Size * (int)sizeof(ImGuiStorage::Pair));
Expand Down

0 comments on commit 9f21c71

Please sign in to comment.