|
@@ -1419,7 +1419,7 @@ void ImGui::TableSetupColumn(const char* label, ImGuiTableColumnFlags flags,
|
|
}
|
|
}
|
|
|
|
|
|
// Starts into the first cell of a new row
|
|
// Starts into the first cell of a new row
|
|
-void ImGui::TableNextRow(ImGuiTableRowFlags row_flags, float min_row_height)
|
|
|
|
|
|
+void ImGui::TableNextRow(ImGuiTableRowFlags row_flags, float row_min_height)
|
|
{
|
|
{
|
|
ImGuiContext& g = *GImGui;
|
|
ImGuiContext& g = *GImGui;
|
|
ImGuiTable* table = g.CurrentTable;
|
|
ImGuiTable* table = g.CurrentTable;
|
|
@@ -1431,12 +1431,13 @@ void ImGui::TableNextRow(ImGuiTableRowFlags row_flags, float min_row_height)
|
|
|
|
|
|
table->LastRowFlags = table->RowFlags;
|
|
table->LastRowFlags = table->RowFlags;
|
|
table->RowFlags = row_flags;
|
|
table->RowFlags = row_flags;
|
|
|
|
+ table->RowMinHeight = row_min_height;
|
|
TableBeginRow(table);
|
|
TableBeginRow(table);
|
|
|
|
|
|
// We honor min_row_height requested by user, but cannot guarantee per-row maximum 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.
|
|
// because that would essentially require a unique clipping rectangle per-cell.
|
|
table->RowPosY2 += table->CellPaddingY * 2.0f;
|
|
table->RowPosY2 += table->CellPaddingY * 2.0f;
|
|
- table->RowPosY2 = ImMax(table->RowPosY2, table->RowPosY1 + min_row_height);
|
|
|
|
|
|
+ table->RowPosY2 = ImMax(table->RowPosY2, table->RowPosY1 + row_min_height);
|
|
|
|
|
|
TableBeginCell(table, 0);
|
|
TableBeginCell(table, 0);
|
|
}
|
|
}
|
|
@@ -1937,6 +1938,7 @@ void ImGui::TableAutoHeaders()
|
|
|
|
|
|
// Emit a column header (text + optional sort order)
|
|
// Emit a column header (text + optional sort order)
|
|
// We cpu-clip text here so that all columns headers can be merged into a same draw call.
|
|
// We cpu-clip text here so that all columns headers can be merged into a same draw call.
|
|
|
|
+// Note that because of how we cpu-clip and display sorting indicators, you _cannot_ use SameLine() after a TableHeader()
|
|
// FIXME-TABLE: Should hold a selection state.
|
|
// FIXME-TABLE: Should hold a selection state.
|
|
// FIXME-TABLE: Style confusion between CellPadding.y and FramePadding.y
|
|
// FIXME-TABLE: Style confusion between CellPadding.y and FramePadding.y
|
|
void ImGui::TableHeader(const char* label)
|
|
void ImGui::TableHeader(const char* label)
|
|
@@ -1961,7 +1963,7 @@ void ImGui::TableHeader(const char* label)
|
|
|
|
|
|
// If we already got a row height, there's use that.
|
|
// If we already got a row height, there's use that.
|
|
ImRect cell_r = TableGetCellRect();
|
|
ImRect cell_r = TableGetCellRect();
|
|
- float label_height = ImMax(label_size.y, cell_r.GetHeight() - g.Style.CellPadding.y * 2.0f);
|
|
|
|
|
|
+ float label_height = ImMax(label_size.y, table->RowMinHeight - g.Style.CellPadding.y * 2.0f);
|
|
|
|
|
|
//GetForegroundDrawList()->AddRect(cell_r.Min, cell_r.Max, IM_COL32(255, 0, 0, 255)); // [DEBUG]
|
|
//GetForegroundDrawList()->AddRect(cell_r.Min, cell_r.Max, IM_COL32(255, 0, 0, 255)); // [DEBUG]
|
|
ImRect work_r = cell_r;
|
|
ImRect work_r = cell_r;
|