fix gamelist sizing by using max of computed size vs set size

This commit is contained in:
jrassa 2017-06-26 23:34:37 -04:00
parent c874c506d9
commit 2d6871dd97

View file

@ -143,7 +143,7 @@ void TextListComponent<T>::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<T>::applyTheme(const std::shared_ptr<ThemeData>& 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<std::string>("scrollSound")));
@ -384,8 +386,6 @@ void TextListComponent<T>::applyTheme(const std::shared_ptr<ThemeData>& theme, c
if(elem->has("selectorHeight"))
{
setSelectorHeight(elem->get<float>("selectorHeight") * Renderer::getScreenHeight());
} else {
setSelectorHeight(mFont->getSize() * 1.5);
}
if(elem->has("selectorOffsetY"))
{