From e13cac5f0bb3be0c2fca65526dac947ff4ac18b7 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Mon, 17 Mar 2025 17:10:23 +0100 Subject: [PATCH] Fixed an issue where the menus would sometimes contain fractional rows --- es-core/src/components/ComponentList.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/es-core/src/components/ComponentList.cpp b/es-core/src/components/ComponentList.cpp index 84459f31f..b27d51a8e 100644 --- a/es-core/src/components/ComponentList.cpp +++ b/es-core/src/components/ComponentList.cpp @@ -239,9 +239,10 @@ void ComponentList::render(const glm::mat4& parentTrans) return; glm::mat4 trans {parentTrans * getTransform()}; + int overflow {(static_cast(std::round(mSize.y)) % static_cast(mRowHeight))}; // Clip everything to be inside our bounds. - glm::vec3 dim {mSize.x, mSize.y, 0.0f}; + glm::vec3 dim {mSize.x, mSize.y - overflow, 0.0f}; dim.x = (trans[0].x * dim.x + trans[3].x) - trans[3].x; dim.y = (trans[1].y * dim.y + trans[3].y) - trans[3].y;