Tables: Fix calculation of auto-fit (remove padding). Demo setting a width in columns setup + ImGuiTableFlags_NoKeepColumnsVisible.

This commit is contained in:
omar
2020-07-17 23:23:04 +02:00
committed by ocornut
parent c96c84b6dc
commit a0e6aa1766
3 changed files with 33 additions and 6 deletions

View File

@ -1041,7 +1041,7 @@ enum ImGuiTableFlags_
ImGuiTableFlags_SizingPolicyStretchX = 1 << 14, // Default if ScrollX is off. Columns will default to use _WidthStretch policy. Read description above for more details.
ImGuiTableFlags_NoHeadersWidth = 1 << 15, // Disable header width contribution to automatic width calculation.
ImGuiTableFlags_NoHostExtendY = 1 << 16, // (FIXME-TABLE: Reword as SizingPolicy?) Disable extending past the limit set by outer_size.y, only meaningful when neither of ScrollX|ScrollY are set (data below the limit will be clipped and not visible)
ImGuiTableFlags_NoKeepColumnsVisible = 1 << 17, // (FIXME-TABLE) Disable code that keeps column always minimally visible when table width gets too small.
ImGuiTableFlags_NoKeepColumnsVisible = 1 << 17, // (FIXME-TABLE) Disable code that keeps column always minimally visible when table width gets too small and horizontal scrolling is off.
// Scrolling
ImGuiTableFlags_ScrollX = 1 << 18, // Enable horizontal scrolling. Require 'outer_size' parameter of BeginTable() to specify the container size. Because this create a child window, ScrollY is currently generally recommended when using ScrollX.
ImGuiTableFlags_ScrollY = 1 << 19, // Enable vertical scrolling. Require 'outer_size' parameter of BeginTable() to specify the container size.