Tables: fixed matching width of synchronized tables when only some (not all) instances have a vertical scrollbar. (#5920)

This commit is contained in:
ocornut
2022-12-08 19:53:57 +01:00
parent 0949acb6e6
commit 317b33d647
4 changed files with 22 additions and 4 deletions

View File

@ -2507,7 +2507,7 @@ struct ImGuiTableInstanceData
ImGuiTableInstanceData() { LastOuterHeight = LastFirstRowHeight = LastFrozenHeight = 0.0f; }
};
// FIXME-TABLE: more transient data could be stored in a per-stacked table structure: DrawSplitter, SortSpecs, incoming RowData
// FIXME-TABLE: more transient data could be stored in a stacked ImGuiTableTempData: e.g. SortSpecs, incoming RowData
struct IMGUI_API ImGuiTable
{
ImGuiID ID;
@ -2612,6 +2612,8 @@ struct IMGUI_API ImGuiTable
bool IsResetDisplayOrderRequest;
bool IsUnfrozenRows; // Set when we got past the frozen row.
bool IsDefaultSizingPolicy; // Set if user didn't explicitly set a sizing policy in BeginTable()
bool HasScrollbarYCurr; // Whether ANY instance of this table had a vertical scrollbar during the current frame.
bool HasScrollbarYPrev; // Whether ANY instance of this table had a vertical scrollbar during the previous.
bool MemoryCompacted;
bool HostSkipItems; // Backup of InnerWindow->SkipItem at the end of BeginTable(), because we will overwrite InnerWindow->SkipItem on a per-column basis