Tables: Made it possible to change style.CellPadding.y between rows. Added demo.

This commit is contained in:
ocornut
2023-09-04 11:20:20 +02:00
parent 3816d478df
commit e8a5c9e1b8
6 changed files with 28 additions and 7 deletions

View File

@ -1750,6 +1750,7 @@ void ImGui::TableNextRow(ImGuiTableRowFlags row_flags, float row_min_height)
// We honor min_row_height requested by user, but cannot guarantee per-row maximum height,
// because that would essentially require a unique clipping rectangle per-cell.
table->CellPaddingY = g.Style.CellPadding.y;
table->RowPosY2 += table->CellPaddingY * 2.0f;
table->RowPosY2 = ImMax(table->RowPosY2, table->RowPosY1 + row_min_height);