mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 15:45:38 +00:00
fix gamelist sizing by using max of computed size vs set size
This commit is contained in:
parent
c874c506d9
commit
2d6871dd97
|
@ -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"))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue