Demo tweaks. Moved Tabs to Widgets section. Added to Tables demo. Increased version following 00b35c08.

This commit is contained in:
ocornut
2021-01-14 11:21:13 +01:00
parent 00b35c081e
commit b0db741770
4 changed files with 198 additions and 163 deletions

View File

@ -1313,7 +1313,8 @@ void ImGui::EndTable()
outer_window->DC.CurrentTableIdx = g.CurrentTable ? g.Tables.GetIndex(g.CurrentTable) : -1;
}
// See "COLUMN SIZING POLICIES" comments at the top of this file
// See "COLUMN SIZING POLICIES" comments at the top of this file
// If (init_width_or_weight <= 0.0f) it is ignored
void ImGui::TableSetupColumn(const char* label, ImGuiTableColumnFlags flags, float init_width_or_weight, ImGuiID user_id)
{
ImGuiContext& g = *GImGui;
@ -1341,8 +1342,6 @@ void ImGui::TableSetupColumn(const char* label, ImGuiTableColumnFlags flags, flo
flags = column->Flags;
// Initialize defaults
if (flags & ImGuiTableColumnFlags_WidthStretch)
IM_ASSERT(init_width_or_weight != 0.0f && "Need to provide a valid weight!");
column->InitStretchWeightOrWidth = init_width_or_weight;
if (table->IsInitializing)
{