mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-11 00:04:24 +00:00
Tables: non-resizable columns also submit their requested width for auto-fit,
This commit is contained in:
parent
a0e6aa1766
commit
30e21eb280
1 changed files with 6 additions and 0 deletions
|
|
@ -614,6 +614,12 @@ void ImGui::TableUpdateLayout(ImGuiTable* table)
|
|||
column_width_ideal = ImMax(column_width_ideal, column_content_width_headers);
|
||||
column_width_ideal = ImMax(column_width_ideal + padding_auto_x, min_column_width);
|
||||
|
||||
// Non-resizable columns also submit their requested width
|
||||
if (column->Flags & ImGuiTableColumnFlags_WidthFixed)
|
||||
if (column->WidthOrWeightInitValue > 0.0f)
|
||||
if (!(table->Flags & ImGuiTableFlags_Resizable) || !(column->Flags & ImGuiTableColumnFlags_NoResize))
|
||||
column_width_ideal = ImMax(column_width_ideal, column->WidthOrWeightInitValue);
|
||||
|
||||
// CellSpacingX is >0.0f when there's no vertical border
|
||||
table->ColumnsAutoFitWidth += column_width_ideal;
|
||||
if (column->PrevVisibleColumn != -1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue