mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-13 00:09:55 +02:00
Tables: Added ImGuiTableFlags_NoKeepColumnsVisible wip flag useful for layout purpose. (WIP)
This commit is contained in:
@ -724,7 +724,8 @@ void ImGui::TableUpdateLayout(ImGuiTable* table)
|
||||
{
|
||||
// If horizontal scrolling if disabled, we apply a final lossless shrinking of columns in order to make sure they are all visible.
|
||||
// Because of this we also know that all of the columns will always fit in table->WorkRect and therefore in table->InnerRect (because ScrollX is off)
|
||||
max_x = table->WorkRect.Max.x - (table->ColumnsActiveCount - (column->IndexWithinActiveSet + 1)) * min_column_width;
|
||||
if (!(table->Flags & ImGuiTableFlags_NoKeepColumnsVisible))
|
||||
max_x = table->WorkRect.Max.x - (table->ColumnsActiveCount - (column->IndexWithinActiveSet + 1)) * min_column_width;
|
||||
}
|
||||
if (offset_x + column->WidthGiven > max_x)
|
||||
column->WidthGiven = ImMax(max_x - offset_x, min_column_width);
|
||||
|
Reference in New Issue
Block a user