mirror of
https://github.com/ocornut/imgui.git
synced 2026-06-03 18:44:53 +00:00
ImStrv: detect and fixed misuses of CalcTextSize() old signature. (9321)
For IMGUI_DISABLE_OBSOLETE_FUNCTIONS only.
This commit is contained in:
@@ -3128,7 +3128,7 @@ float ImGui::TableGetHeaderAngledMaxLabelWidth()
|
||||
for (int column_n = 0; column_n < table->ColumnsCount; column_n++)
|
||||
if (IM_BITARRAY_TESTBIT(table->EnabledMaskByIndex, column_n))
|
||||
if (table->Columns[column_n].Flags & ImGuiTableColumnFlags_AngledHeader)
|
||||
width = ImMax(width, CalcTextSize(TableGetColumnName(table, column_n), NULL, true).x);
|
||||
width = ImMax(width, CalcTextSize(TableGetColumnName(table, column_n), true).x);
|
||||
return width + g.Style.CellPadding.y * 2.0f; // Swap padding
|
||||
}
|
||||
|
||||
@@ -3537,7 +3537,7 @@ static bool MenuItemForColumnReorder(ImStrv label, bool selected, bool enabled)
|
||||
ImGuiContext& g = *GImGui;
|
||||
ImGuiWindow* window = g.CurrentWindow;
|
||||
|
||||
ImVec2 label_size = CalcTextSize(label, NULL, true);
|
||||
ImVec2 label_size = CalcTextSize(label, true);
|
||||
ImGuiMenuColumns* offsets = &window->DC.MenuColumns;
|
||||
float checkmark_w = IM_TRUNC(g.FontSize * 1.20f);
|
||||
float min_w = offsets->DeclColumns(0.0f, label_size.x, 0.0f, checkmark_w); // Feedback for next frame
|
||||
|
||||
Reference in New Issue
Block a user