Skip to content

Commit

Permalink
Tables: fixed cell background of fully clipped row overlapping with h…
Browse files Browse the repository at this point in the history
…eader. (#7575, #7041)
  • Loading branch information
prabuinet authored and ocornut committed May 13, 2024
1 parent f48aae6 commit 510eb8f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docs/CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ Breaking changes:

Other changes:

- Tables: fixed cell background of fully clipped row overlapping with header. (#7575, #7041) [@prabuinet]


-----------------------------------------------------------------------
VERSION 1.90.6 (Released 2024-05-08)
Expand Down
3 changes: 2 additions & 1 deletion imgui_tables.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1963,7 +1963,8 @@ void ImGui::TableEndRow(ImGuiTable* table)
cell_bg_rect.ClipWith(table->BgClipRect);
cell_bg_rect.Min.x = ImMax(cell_bg_rect.Min.x, column->ClipRect.Min.x); // So that first column after frozen one gets clipped when scrolling
cell_bg_rect.Max.x = ImMin(cell_bg_rect.Max.x, column->MaxX);
window->DrawList->AddRectFilled(cell_bg_rect.Min, cell_bg_rect.Max, cell_data->BgColor);
if (cell_bg_rect.Min.y < cell_bg_rect.Max.y)
window->DrawList->AddRectFilled(cell_bg_rect.Min, cell_bg_rect.Max, cell_data->BgColor);
}
}

Expand Down

0 comments on commit 510eb8f

Please sign in to comment.