Tables: Honor width/weight passed to TableSetupColumn() after .ini load since we don't actually restore that data currently.

Demo: Remove filter from Advanced Table demo since it's breaking with clipping.
This commit is contained in:
omar
2020-01-09 22:02:16 +01:00
committed by ocornut
parent 0e7b3f2f2f
commit 5431cbd3f0
3 changed files with 21 additions and 17 deletions

View File

@ -1830,9 +1830,9 @@ struct ImGuiTableColumn
ImGuiID UserID; // Optional, value passed to TableSetupColumn()
ImGuiTableColumnFlags FlagsIn; // Flags as they were provided by user. See ImGuiTableColumnFlags_
ImGuiTableColumnFlags Flags; // Effective flags. See ImGuiTableColumnFlags_
float ResizeWeight; // ~1.0f. Master width data when (Flags & _WidthStretch)
float MinX; // Absolute positions
float MaxX;
float ResizeWeight; // ~1.0f. Master width data when (Flags & _WidthStretch)
float WidthRequested; // Master width data when !(Flags & _WidthStretch)
float WidthGiven; // == (MaxX - MinX). FIXME-TABLE: Store all persistent width in multiple of FontSize?
float StartXRows; // Start position for the frame, currently ~(MinX + CellPaddingX)
@ -1865,8 +1865,7 @@ struct ImGuiTableColumn
ImGuiTableColumn()
{
memset(this, 0, sizeof(*this));
ResizeWeight = 1.0f;
WidthRequested = WidthGiven = -1.0f;
ResizeWeight = WidthRequested = WidthGiven = -1.0f;
NameOffset = -1;
IsActive = NextIsActive = true;
IndexDisplayOrder = IndexWithinActiveSet = -1;