|
@@ -2780,8 +2780,11 @@ float ImGui::TableGetHeaderRowHeight()
|
|
|
float row_height = GetTextLineHeight();
|
|
|
int columns_count = TableGetColumnCount();
|
|
|
for (int column_n = 0; column_n < columns_count; column_n++)
|
|
|
- if (TableGetColumnFlags(column_n) & ImGuiTableColumnFlags_IsEnabled)
|
|
|
+ {
|
|
|
+ ImGuiTableColumnFlags flags = TableGetColumnFlags(column_n);
|
|
|
+ if ((flags & ImGuiTableColumnFlags_IsEnabled) && !(flags & ImGuiTableColumnFlags_NoHeaderLabel))
|
|
|
row_height = ImMax(row_height, CalcTextSize(TableGetColumnName(column_n)).y);
|
|
|
+ }
|
|
|
row_height += GetStyle().CellPadding.y * 2.0f;
|
|
|
return row_height;
|
|
|
}
|
|
@@ -2818,7 +2821,7 @@ void ImGui::TableHeadersRow()
|
|
|
// Push an id to allow unnamed labels (generally accidental, but let's behave nicely with them)
|
|
|
// - in your own code you may omit the PushID/PopID all-together, provided you know they won't collide
|
|
|
// - table->InstanceCurrent is only >0 when we use multiple BeginTable/EndTable calls with same identifier.
|
|
|
- const char* name = TableGetColumnName(column_n);
|
|
|
+ const char* name = (TableGetColumnFlags(column_n) & ImGuiTableColumnFlags_NoHeaderLabel) ? "" : TableGetColumnName(column_n);
|
|
|
PushID(table->InstanceCurrent * table->ColumnsCount + column_n);
|
|
|
TableHeader(name);
|
|
|
PopID();
|