mirror of
https://github.com/shadps4-emu/ext-imgui.git
synced 2024-11-27 04:00:51 +00:00
Tables: fixed auto-fitting columns not marking settings as dirty + fixed CellBg fill not narrow clipping on ScrollX + freeze.
This commit is contained in:
parent
9918b2f147
commit
fae362fd0b
@ -496,6 +496,9 @@ void ImGui::TableBeginUpdateColumns(ImGuiTable* table)
|
||||
// the column fitting to wait until the first visible frame of the child container (may or not be a good thing).
|
||||
if (want_column_auto_fit && table->OuterWindow != table->InnerWindow)
|
||||
table->InnerWindow->SkipItems = false;
|
||||
|
||||
if (want_column_auto_fit)
|
||||
table->IsSettingsDirty = true;
|
||||
}
|
||||
|
||||
// Adjust flags: default width mode + stretch columns are not allowed when auto extending
|
||||
@ -1752,6 +1755,8 @@ void ImGui::TableEndRow(ImGuiTable* table)
|
||||
{
|
||||
ImRect cell_bg_rect = TableGetCellBgRect(table, cell_data->Column);
|
||||
cell_bg_rect.ClipWith(table->BackgroundClipRect);
|
||||
cell_bg_rect.Min.x = ImMax(cell_bg_rect.Min.x, table->Columns[cell_data->Column].ClipRect.Min.x);
|
||||
cell_bg_rect.Max.x = ImMin(cell_bg_rect.Max.x, table->Columns[cell_data->Column].ClipRect.Max.x);
|
||||
window->DrawList->AddRectFilled(cell_bg_rect.Min, cell_bg_rect.Max, cell_data->BgColor);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user