Skip to content

Commit

Permalink
Fix thedmd#205: workaround clipping issues when link with docked windows
Browse files Browse the repository at this point in the history
This is a workaround for
         thedmd#205
         pthom/imgui_bundle#117
     Adding a simple pixel at m_WidgetRect.Max is enough to bypass the issue
  • Loading branch information
pthom committed Aug 2, 2023
1 parent 2ba8ca4 commit 2265a4b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions imgui_canvas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,13 @@ bool ImGuiEx::Canvas::Begin(ImGuiID id, const ImVec2& size)
//m_DrawList->AddRectFilled(m_StartPos, m_StartPos + m_CurrentSize, IM_COL32(0, 0, 0, 64));
//m_DrawList->AddRect(m_WidgetRect.Min, m_WidgetRect.Max, IM_COL32(255, 0, 255, 64));

// Fix for
// https://github.com/thedmd/imgui-node-editor/issues/205
// https://github.com/pthom/imgui_bundle/issues/117
// Adding a simple pixel at m_WidgetRect.Max is enough to temporarily solve the issue
// (the color is selected to be as transparent as possible)
m_DrawList->AddLine(m_WidgetRect.Max, m_WidgetRect.Max, IM_COL32(0, 0, 0, 1));

ImGui::SetCursorScreenPos(ImVec2(0.0f, 0.0f));

# if IMGUI_EX_CANVAS_DEFERED()
Expand Down

0 comments on commit 2265a4b

Please sign in to comment.