mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-29 19:55:37 +00:00
Fixed an issue where ScrollableContainer would cause excessive stuttering with some legacy theme sets.
This commit is contained in:
parent
611824be18
commit
16880028d7
|
@ -192,9 +192,8 @@ void GamelistView::legacyPopulateFields()
|
||||||
// Scrollable container (game description).
|
// Scrollable container (game description).
|
||||||
mContainerComponents.push_back(std::make_unique<ScrollableContainer>());
|
mContainerComponents.push_back(std::make_unique<ScrollableContainer>());
|
||||||
mContainerComponents.back()->setThemeMetadata("text_md_description");
|
mContainerComponents.back()->setThemeMetadata("text_md_description");
|
||||||
mContainerComponents.back()->setSize(mSize.x * (0.50f - 2.0f * padding),
|
|
||||||
mSize.y - mContainerComponents.back()->getPosition().y);
|
|
||||||
mContainerComponents.back()->setAutoScroll(true);
|
mContainerComponents.back()->setAutoScroll(true);
|
||||||
|
mContainerComponents.back()->setVisible(false);
|
||||||
mContainerComponents.back()->setDefaultZIndex(40.0f);
|
mContainerComponents.back()->setDefaultZIndex(40.0f);
|
||||||
addChild(mContainerComponents.back().get());
|
addChild(mContainerComponents.back().get());
|
||||||
|
|
||||||
|
@ -743,7 +742,7 @@ void GamelistView::legacyInitMDValues()
|
||||||
|
|
||||||
for (auto& container : mContainerComponents) {
|
for (auto& container : mContainerComponents) {
|
||||||
container->setPosition(container->getPosition().x, bottom + mSize.y * 0.01f);
|
container->setPosition(container->getPosition().x, bottom + mSize.y * 0.01f);
|
||||||
container->setSize(container->getSize().x, mSize.y - container->getPosition().y);
|
container->setSize(mSize.x * 0.2f, mSize.y * 0.2f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -108,7 +108,7 @@ void ScrollableContainer::applyTheme(const std::shared_ptr<ThemeData>& theme,
|
||||||
|
|
||||||
void ScrollableContainer::update(int deltaTime)
|
void ScrollableContainer::update(int deltaTime)
|
||||||
{
|
{
|
||||||
if (mSize == glm::vec2 {0.0f, 0.0f})
|
if (!isVisible() || mSize == glm::vec2 {0.0f, 0.0f})
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Don't scroll if the media viewer or screensaver is active or if text scrolling is disabled;
|
// Don't scroll if the media viewer or screensaver is active or if text scrolling is disabled;
|
||||||
|
|
Loading…
Reference in a new issue