Internals: added facility to hide windows from render without interfering with the HiddenFramesCanSkipItems/HiddenFramesCannotSkipItems fields which have effects on layout. Compact some fields.

Ideally we'd have a simpler system but it's not easy to make the capture system change to hook at the right spot. Will rework.
This commit is contained in:
ocornut
2020-12-11 14:29:42 +01:00
parent 1ad5502f18
commit bff1836922
3 changed files with 12 additions and 9 deletions

View File

@ -716,8 +716,8 @@ void ImGui::TableUpdateLayout(ImGuiTable* table)
// Combine width from regular rows + width from headers unless requested not to.
if (!column->IsPreserveWidthAuto)
{
const float content_width_body = (float)ImMax(column->ContentMaxXFrozen, column->ContentMaxXUnfrozen) - column->WorkMinX;
const float content_width_headers = (float)column->ContentMaxXHeadersIdeal - column->WorkMinX;
const float content_width_body = ImMax(column->ContentMaxXFrozen, column->ContentMaxXUnfrozen) - column->WorkMinX;
const float content_width_headers = column->ContentMaxXHeadersIdeal - column->WorkMinX;
float width_auto = content_width_body;
if (!(table->Flags & ImGuiTableFlags_NoHeadersWidth) && !(column->Flags & ImGuiTableColumnFlags_NoHeaderWidth))
width_auto = ImMax(width_auto, content_width_headers);