Skip to content

Commit 2265a4b

Browse files
committed
Fix thedmd#205: workaround clipping issues when link with docked windows
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
1 parent 2ba8ca4 commit 2265a4b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

imgui_canvas.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,13 @@ bool ImGuiEx::Canvas::Begin(ImGuiID id, const ImVec2& size)
119119
//m_DrawList->AddRectFilled(m_StartPos, m_StartPos + m_CurrentSize, IM_COL32(0, 0, 0, 64));
120120
//m_DrawList->AddRect(m_WidgetRect.Min, m_WidgetRect.Max, IM_COL32(255, 0, 255, 64));
121121

122+
// Fix for
123+
// https://github.com/thedmd/imgui-node-editor/issues/205
124+
// https://github.com/pthom/imgui_bundle/issues/117
125+
// Adding a simple pixel at m_WidgetRect.Max is enough to temporarily solve the issue
126+
// (the color is selected to be as transparent as possible)
127+
m_DrawList->AddLine(m_WidgetRect.Max, m_WidgetRect.Max, IM_COL32(0, 0, 0, 1));
128+
122129
ImGui::SetCursorScreenPos(ImVec2(0.0f, 0.0f));
123130

124131
# if IMGUI_EX_CANVAS_DEFERED()

0 commit comments

Comments
 (0)