mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 15:45:38 +00:00
Fixed a minor animation glitch in the gamelist view.
Also removed the explicit setDisplayRelative() call which made it impossible to override this theme setting.
This commit is contained in:
parent
1cba6e202e
commit
8103bef3b8
|
@ -555,7 +555,11 @@ void GamelistView::legacyUpdateInfoPanel()
|
||||||
comps.push_back(mRatingComponents.front().get());
|
comps.push_back(mRatingComponents.front().get());
|
||||||
|
|
||||||
for (auto it = comps.cbegin(); it != comps.cend(); ++it) {
|
for (auto it = comps.cbegin(); it != comps.cend(); ++it) {
|
||||||
GuiComponent* comp = *it;
|
GuiComponent* comp {*it};
|
||||||
|
if (!fadingOut && !comp->isAnimationPlaying(0)) {
|
||||||
|
comp->setOpacity(1.0f);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
// An animation is playing, then animate if reverse != fadingOut.
|
// An animation is playing, then animate if reverse != fadingOut.
|
||||||
// An animation is not playing, then animate if opacity != our target opacity.
|
// An animation is not playing, then animate if opacity != our target opacity.
|
||||||
if ((comp->isAnimationPlaying(0) && comp->isAnimationReversed(0) != fadingOut) ||
|
if ((comp->isAnimationPlaying(0) && comp->isAnimationReversed(0) != fadingOut) ||
|
||||||
|
@ -635,9 +639,7 @@ void GamelistView::legacyInitMDValues()
|
||||||
}
|
}
|
||||||
|
|
||||||
mDateTimeComponents[LegacyDateTime::MD_RELEASEDATE]->setFont(defaultFont);
|
mDateTimeComponents[LegacyDateTime::MD_RELEASEDATE]->setFont(defaultFont);
|
||||||
// mDateTimeComponents[LegacyDateTime::MD_RELEASEDATE]->setColor(0xFFFFFFFF);
|
|
||||||
mDateTimeComponents[LegacyDateTime::MD_LASTPLAYED]->setFont(defaultFont);
|
mDateTimeComponents[LegacyDateTime::MD_LASTPLAYED]->setFont(defaultFont);
|
||||||
// mDateTimeComponents[LegacyDateTime::MD_LASTPLAYED]->setColor(0xFFFFFFFF);
|
|
||||||
|
|
||||||
values.emplace_back(mRatingComponents.front().get());
|
values.emplace_back(mRatingComponents.front().get());
|
||||||
values.emplace_back(mDateTimeComponents[LegacyDateTime::MD_RELEASEDATE].get());
|
values.emplace_back(mDateTimeComponents[LegacyDateTime::MD_RELEASEDATE].get());
|
||||||
|
|
|
@ -714,14 +714,11 @@ void GamelistView::updateInfoPanel()
|
||||||
}
|
}
|
||||||
else if (metadata == "md_lastplayed") {
|
else if (metadata == "md_lastplayed") {
|
||||||
date->setValue(file->metadata.get("lastplayed"));
|
date->setValue(file->metadata.get("lastplayed"));
|
||||||
date->setDisplayRelative(true);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
date->setValue("19700101T000000");
|
date->setValue("19700101T000000");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fadingOut = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<GuiComponent*> comps;
|
std::vector<GuiComponent*> comps;
|
||||||
|
@ -756,7 +753,11 @@ void GamelistView::updateInfoPanel()
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto it = comps.cbegin(); it != comps.cend(); ++it) {
|
for (auto it = comps.cbegin(); it != comps.cend(); ++it) {
|
||||||
GuiComponent* comp = *it;
|
GuiComponent* comp {*it};
|
||||||
|
if (!fadingOut && !comp->isAnimationPlaying(0)) {
|
||||||
|
comp->setOpacity(1.0f);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
// An animation is playing, then animate if reverse != fadingOut.
|
// An animation is playing, then animate if reverse != fadingOut.
|
||||||
// An animation is not playing, then animate if opacity != our target opacity.
|
// An animation is not playing, then animate if opacity != our target opacity.
|
||||||
if ((comp->isAnimationPlaying(0) && comp->isAnimationReversed(0) != fadingOut) ||
|
if ((comp->isAnimationPlaying(0) && comp->isAnimationReversed(0) != fadingOut) ||
|
||||||
|
|
Loading…
Reference in a new issue