mirror of
https://github.com/xemu-project/imgui.git
synced 2024-11-24 02:39:58 +00:00
Separator: Fixed zero-height bounding box resulting in clipping when at top of clipping rectangle (#860)
This commit is contained in:
parent
31dc7d8d63
commit
cb7e1c18b5
@ -9092,8 +9092,8 @@ void ImGui::Separator()
|
||||
if (!window->DC.GroupStack.empty())
|
||||
x1 += window->DC.IndentX;
|
||||
|
||||
const ImRect bb(ImVec2(x1, window->DC.CursorPos.y), ImVec2(x2, window->DC.CursorPos.y));
|
||||
ItemSize(ImVec2(0.0f, 0.0f)); // NB: we don't provide our width so that it doesn't get feed back into AutoFit // FIXME: Height should be 1.0f not 0.0f ?
|
||||
const ImRect bb(ImVec2(x1, window->DC.CursorPos.y), ImVec2(x2, window->DC.CursorPos.y+1.0f));
|
||||
ItemSize(ImVec2(0.0f, 0.0f)); // NB: we don't provide our width so that it doesn't get feed back into AutoFit, we don't provide height to not alter layout.
|
||||
if (!ItemAdd(bb, NULL))
|
||||
{
|
||||
if (window->DC.ColumnsCount > 1)
|
||||
@ -9101,7 +9101,7 @@ void ImGui::Separator()
|
||||
return;
|
||||
}
|
||||
|
||||
window->DrawList->AddLine(bb.Min, bb.Max, GetColorU32(ImGuiCol_Border));
|
||||
window->DrawList->AddLine(bb.Min, ImVec2(bb.Max.x,bb.Min.y), GetColorU32(ImGuiCol_Border));
|
||||
|
||||
ImGuiContext& g = *GImGui;
|
||||
if (g.LogEnabled)
|
||||
|
Loading…
Reference in New Issue
Block a user