diff --git a/src/components/TextListComponent.h b/src/components/TextListComponent.h index 34e2c8f2d..05d569f1d 100644 --- a/src/components/TextListComponent.h +++ b/src/components/TextListComponent.h @@ -135,7 +135,7 @@ void TextListComponent::render(const Eigen::Affine3f& parentTrans) if(size() == 0) return; - const float entrySize = font->getHeight(mLineSpacing); + const float entrySize = round(font->getHeight(mLineSpacing)); int startEntry = 0; @@ -161,7 +161,7 @@ void TextListComponent::render(const Eigen::Affine3f& parentTrans) if(startEntry < listCutoff) { Renderer::setMatrix(trans); - Renderer::drawRect(0.f, (mCursor - startEntry)*entrySize, mSize.x(), font->getHeight(), mSelectorColor); + Renderer::drawRect(0.f, (mCursor - startEntry)*entrySize + (entrySize - font->getHeight())/2, mSize.x(), font->getHeight(), mSelectorColor); } // clip to inside margins