Tables: Store submitted column width and avoid saving default default widths.

This commit is contained in:
omar
2020-07-17 22:39:28 +02:00
committed by ocornut
parent 57916b891b
commit c96c84b6dc
2 changed files with 19 additions and 14 deletions

View File

@ -1897,6 +1897,7 @@ struct ImGuiTableColumn
ImGuiTableColumnFlags Flags; // Effective flags. See ImGuiTableColumnFlags_
float MinX; // Absolute positions
float MaxX;
float WidthOrWeightInitValue; // Value passed to TableSetupColumn()
float WidthStretchWeight; // Master width weight when (Flags & _WidthStretch). Often around ~1.0f initially.
float WidthRequest; // Master width absolute value when !(Flags & _WidthStretch). When Stretch this is derived every frame from WidthStretchWeight in TableUpdateLayout()
float WidthGiven; // Final/actual width visible == (MaxX - MinX), locked in TableUpdateLayout(). May be >WidthRequest to honor minimum width, may be <WidthRequest to honor shrinking columns down in tight space.