mirror of
https://github.com/Drezil/imgui.git
synced 2024-12-18 06:06:35 +00:00
Columns: Fixed another form of shearing made visible by the PreserveWidth option. The code was initially added in c46d5634d4
to fix because we've fixed in e42aaede42eb6d8a47cf104f3afd6057b13a61ee. (#913, #125)
This commit is contained in:
parent
1c83b073c6
commit
7ff1c149b5
@ -9958,17 +9958,19 @@ static float GetDraggedColumnOffset(int column_index)
|
||||
|
||||
float ImGui::GetColumnOffset(int column_index)
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
ImGuiWindow* window = GetCurrentWindowRead();
|
||||
if (column_index < 0)
|
||||
column_index = window->DC.ColumnsCurrent;
|
||||
|
||||
/*
|
||||
if (g.ActiveId)
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
const ImGuiID column_id = window->DC.ColumnsSetId + ImGuiID(column_index);
|
||||
if (g.ActiveId == column_id)
|
||||
return GetDraggedColumnOffset(column_index);
|
||||
}
|
||||
*/
|
||||
|
||||
IM_ASSERT(column_index < window->DC.ColumnsData.Size);
|
||||
const float t = window->DC.ColumnsData[column_index].OffsetNorm;
|
||||
@ -10148,6 +10150,7 @@ void ImGui::Columns(int columns_count, const char* id, bool border)
|
||||
EndColumns();
|
||||
|
||||
ImGuiColumnsFlags flags = (border ? 0 : ImGuiColumnsFlags_NoBorder);
|
||||
//flags |= ImGuiColumnsFlags_NoPreserveWidths | ImGuiColumnsFlags_NoForceWithinWindow; // NB: Legacy behavior
|
||||
if (columns_count != 1)
|
||||
BeginColumns(id, columns_count, flags);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user