From 59839546a504579b2a338a2811ed1d06b9a9fad9 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Fri, 29 Oct 2021 19:44:27 +0200 Subject: [PATCH] Fixed an issue where ComponentList elements would not get correctly centered vertically. --- es-core/src/components/ComponentList.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/es-core/src/components/ComponentList.cpp b/es-core/src/components/ComponentList.cpp index cee1ab3bb..c9d4d7b38 100644 --- a/es-core/src/components/ComponentList.cpp +++ b/es-core/src/components/ComponentList.cpp @@ -448,7 +448,7 @@ void ComponentList::updateElementPosition(const ComponentListRow& row) const auto comp = row.elements.at(i).component; // Center vertically. - comp->setPosition(x, (rowHeight - comp->getSize().y) / 2.0f + yOffset); + comp->setPosition(x, std::round((rowHeight - comp->getSize().y) / 2.0f + yOffset)); x += comp->getSize().x; } }