mirror of
https://github.com/Drezil/imgui.git
synced 2024-12-18 06:06:35 +00:00
Columns: Clamping MaxX above MinX. This shouldn't have much of a benefit / affect, but the internal values are more sane this way. (#125)
This commit is contained in:
parent
ee770af72c
commit
968a8d2a3f
@ -12514,7 +12514,7 @@ void ImGui::BeginColumns(const char* str_id, int columns_count, ImGuiColumnsFlag
|
||||
// Set state for first column
|
||||
const float content_region_width = (window->SizeContentsExplicit.x != 0.0f) ? (window->SizeContentsExplicit.x) : (window->Size.x -window->ScrollbarSizes.x);
|
||||
columns->MinX = window->DC.IndentX - g.Style.ItemSpacing.x; // Lock our horizontal range
|
||||
columns->MaxX = content_region_width - window->Scroll.x;
|
||||
columns->MaxX = ImMax(content_region_width - window->Scroll.x, columns->MinX + 1.0f);
|
||||
columns->StartPosY = window->DC.CursorPos.y;
|
||||
columns->StartMaxPosX = window->DC.CursorMaxPos.x;
|
||||
columns->CellMinY = columns->CellMaxY = window->DC.CursorPos.y;
|
||||
|
Loading…
Reference in New Issue
Block a user