From ed252c55aadd46e4ef78d85f795d6e3c4191a911 Mon Sep 17 00:00:00 2001 From: thedmd Date: Thu, 30 Jul 2026 21:40:05 +0200 Subject: [PATCH] Tables: fixed Y position of lower horizontal border being off by one pixel when vertical ones are not also enabled. Attributed to thedmd who reported this to me. --- docs/CHANGELOG.txt | 2 ++ imgui_tables.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index 35a67649a..fc3d69650 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -43,6 +43,8 @@ Breaking Changes: Other Changes: +- Tables: fixed Y2 position of lower horizontal border (ImGuiTableFlags_BordersOuterH) + being off by one pixel when vertical ones are not also enabled. [@thedmd] - ImDrawData: fixed a regression in 1.92.9 where legacy `ImDrawData::CmdListsCount` was always 0. Prefer using `ImDrawData::CmdList.Size` anyway. diff --git a/imgui_tables.cpp b/imgui_tables.cpp index 4799d5648..a6185d85d 100644 --- a/imgui_tables.cpp +++ b/imgui_tables.cpp @@ -3026,7 +3026,7 @@ void ImGui::TableDrawBorders(ImGuiTable* table) else if (table->Flags & ImGuiTableFlags_BordersOuterH) { inner_drawlist->AddLineH(outer_border.Min.x, outer_border.Max.x, outer_border.Min.y, outer_col, border_size); - inner_drawlist->AddLineH(outer_border.Min.x, outer_border.Max.x, outer_border.Max.y, outer_col, border_size); + inner_drawlist->AddLineH(outer_border.Min.x, outer_border.Max.x, outer_border.Max.y - border_size, outer_col, border_size); } } if ((table->Flags & ImGuiTableFlags_BordersInnerH) && table->RowPosY2 < table->OuterRect.Max.y)