diff --git a/src/Utils.cpp b/src/Utils.cpp index 82e184fe..32646cad 100644 --- a/src/Utils.cpp +++ b/src/Utils.cpp @@ -177,7 +177,7 @@ bool IsLuaCData(const sol::object& acpObject) float GetAlignedItemWidth(const int64_t acItemsCount) { - return (ImGui::GetWindowContentRegionMax().x - ImGui::GetWindowContentRegionMin().x - static_cast(acItemsCount - 1) * ImGui::GetStyle().ItemSpacing.x) / + return (ImGui::GetContentRegionAvail().x - static_cast(acItemsCount - 1) * ImGui::GetStyle().ItemSpacing.x) / static_cast(acItemsCount); }