From 2d6871dd97f2cbbb4517523b98470e27524dbf79 Mon Sep 17 00:00:00 2001 From: jrassa Date: Mon, 26 Jun 2017 23:34:37 -0400 Subject: [PATCH] fix gamelist sizing by using max of computed size vs set size --- es-app/src/components/TextListComponent.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/es-app/src/components/TextListComponent.h b/es-app/src/components/TextListComponent.h index f6a1313b7..b39dda3ce 100644 --- a/es-app/src/components/TextListComponent.h +++ b/es-app/src/components/TextListComponent.h @@ -143,7 +143,7 @@ void TextListComponent::render(const Eigen::Affine3f& parentTrans) if(size() == 0) return; - const float entrySize = font->getSize() * mLineSpacing; + const float entrySize = std::max(font->getHeight(1.0), (float)font->getSize()) * mLineSpacing; int startEntry = 0; @@ -350,7 +350,9 @@ void TextListComponent::applyTheme(const std::shared_ptr& theme, c } setFont(Font::getFromTheme(elem, properties, mFont)); - + const float selectorHeight = std::max(mFont->getHeight(1.0), (float)mFont->getSize()) * mLineSpacing; + setSelectorHeight(selectorHeight); + if(properties & SOUND && elem->has("scrollSound")) setSound(Sound::get(elem->get("scrollSound"))); @@ -384,8 +386,6 @@ void TextListComponent::applyTheme(const std::shared_ptr& theme, c if(elem->has("selectorHeight")) { setSelectorHeight(elem->get("selectorHeight") * Renderer::getScreenHeight()); - } else { - setSelectorHeight(mFont->getSize() * 1.5); } if(elem->has("selectorOffsetY")) {