diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index 20e12f251..2399932f9 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -55,6 +55,8 @@ Other changes: - Windows: Scrollbar visibility decision uses current size when both size and contents size are submitted by API. (#7252) - Windows: Double-click to collapse may be disabled via key-ownership mechanism. (#7369) +- Tables: Angled headers: fixed border hit box extending beyond when used within + non-scrollable tables. (#7416) [@cfillion] - Menus, Popups: Fixed an issue where sibling menu popups re-opening in successive frames would erroneously close the window. While it is technically a popup issue it would generally manifest when fast moving the mouse bottom to top in a sub-menu. diff --git a/imgui_tables.cpp b/imgui_tables.cpp index 5dbd0972a..b8e0d8628 100644 --- a/imgui_tables.cpp +++ b/imgui_tables.cpp @@ -1240,7 +1240,7 @@ void ImGui::TableUpdateBorders(ImGuiTable* table) ImGuiTableInstanceData* table_instance = TableGetInstanceData(table, table->InstanceCurrent); const float hit_half_width = TABLE_RESIZE_SEPARATOR_HALF_THICKNESS; const float hit_y1 = (table->FreezeRowsCount >= 1 ? table->OuterRect.Min.y : table->WorkRect.Min.y) + table->AngledHeadersHeight; - const float hit_y2_body = ImMax(table->OuterRect.Max.y, hit_y1 + table_instance->LastOuterHeight); + const float hit_y2_body = ImMax(table->OuterRect.Max.y, hit_y1 + table_instance->LastOuterHeight - table->AngledHeadersHeight); const float hit_y2_head = hit_y1 + table_instance->LastTopHeadersRowHeight; for (int order_n = 0; order_n < table->ColumnsCount; order_n++)