mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 14:15:38 +00:00
Removed some unnecessary legacy gamelist code.
This commit is contained in:
parent
027af497d5
commit
98e265413e
|
@ -267,15 +267,9 @@ void GamelistView::legacyOnThemeChanged(const std::shared_ptr<ThemeData>& theme)
|
||||||
theme, getName(), mDateTimeComponents[LegacyDateTime::MD_LASTPLAYED]->getMetadataField(),
|
theme, getName(), mDateTimeComponents[LegacyDateTime::MD_LASTPLAYED]->getMetadataField(),
|
||||||
ALL);
|
ALL);
|
||||||
|
|
||||||
if (mLegacyMode) {
|
for (size_t i = LegacyText::MD_LBL_RATING; i < LegacyText::MD_NAME; ++i) {
|
||||||
for (size_t i = LegacyText::MD_LBL_RATING; i < LegacyText::MD_NAME; ++i)
|
mTextComponents[i]->applyTheme(theme, getName(), mTextComponents[i]->getMetadataField(),
|
||||||
mTextComponents[i]->applyTheme(theme, getName(), mTextComponents[i]->getMetadataField(),
|
ALL ^ ThemeFlags::TEXT);
|
||||||
ALL ^ ThemeFlags::TEXT);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
for (size_t i = LegacyText::MD_LBL_RATING; i < LegacyText::MD_NAME; ++i)
|
|
||||||
mTextComponents[i]->applyTheme(theme, getName(), mTextComponents[i]->getMetadataField(),
|
|
||||||
ALL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto& container : mContainerComponents) {
|
for (auto& container : mContainerComponents) {
|
||||||
|
@ -550,41 +544,16 @@ void GamelistView::legacyUpdateInfoPanel()
|
||||||
|
|
||||||
std::vector<GuiComponent*> comps;
|
std::vector<GuiComponent*> comps;
|
||||||
|
|
||||||
if (!mLegacyMode) {
|
for (size_t i = LegacyText::MD_LBL_RATING; i < LegacyText::END; ++i)
|
||||||
for (auto& text : mTextComponents) {
|
comps.emplace_back(mTextComponents[i].get());
|
||||||
if (text->getScrollHide())
|
comps.emplace_back(mDateTimeComponents[LegacyDateTime::MD_RELEASEDATE].get());
|
||||||
comps.emplace_back(text.get());
|
comps.emplace_back(mDateTimeComponents[LegacyDateTime::MD_LASTPLAYED].get());
|
||||||
}
|
comps.emplace_back(mTextComponents[LegacyText::MD_NAME].get());
|
||||||
for (auto& date : mDateTimeComponents) {
|
comps.emplace_back(mImageComponents[LegacyImage::MD_THUMBNAIL].get());
|
||||||
if (date->getScrollHide())
|
comps.emplace_back(mImageComponents[LegacyImage::MD_MARQUEE].get());
|
||||||
comps.emplace_back(date.get());
|
comps.emplace_back(mImageComponents[LegacyImage::MD_IMAGE].get());
|
||||||
}
|
comps.push_back(mBadgeComponents.front().get());
|
||||||
for (auto& image : mImageComponents) {
|
comps.push_back(mRatingComponents.front().get());
|
||||||
if (image->getScrollHide())
|
|
||||||
comps.emplace_back(image.get());
|
|
||||||
}
|
|
||||||
for (auto& badge : mBadgeComponents) {
|
|
||||||
if (badge->getScrollHide())
|
|
||||||
comps.emplace_back(badge.get());
|
|
||||||
}
|
|
||||||
for (auto& rating : mRatingComponents) {
|
|
||||||
if (rating->getScrollHide())
|
|
||||||
comps.emplace_back(rating.get());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mLegacyMode) {
|
|
||||||
for (size_t i = LegacyText::MD_LBL_RATING; i < LegacyText::END; ++i)
|
|
||||||
comps.emplace_back(mTextComponents[i].get());
|
|
||||||
comps.emplace_back(mDateTimeComponents[LegacyDateTime::MD_RELEASEDATE].get());
|
|
||||||
comps.emplace_back(mDateTimeComponents[LegacyDateTime::MD_LASTPLAYED].get());
|
|
||||||
comps.emplace_back(mTextComponents[LegacyText::MD_NAME].get());
|
|
||||||
comps.emplace_back(mImageComponents[LegacyImage::MD_THUMBNAIL].get());
|
|
||||||
comps.emplace_back(mImageComponents[LegacyImage::MD_MARQUEE].get());
|
|
||||||
comps.emplace_back(mImageComponents[LegacyImage::MD_IMAGE].get());
|
|
||||||
comps.push_back(mBadgeComponents.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;
|
||||||
|
|
Loading…
Reference in a new issue