Implemented a better legacy theme detection in GamelistView.

This commit is contained in:
Leon Styhre 2022-02-06 13:58:50 +01:00
parent afe249c5fc
commit d564a234c1

View file

@ -87,7 +87,12 @@ void GamelistView::onShow()
void GamelistView::onThemeChanged(const std::shared_ptr<ThemeData>& theme)
{
mLegacyMode = mTheme->isLegacyTheme();
auto themeSets = ThemeData::getThemeSets();
std::map<std::string, ThemeData::ThemeSet>::const_iterator selectedSet {
themeSets.find(Settings::getInstance()->getString("ThemeSet"))};
assert(selectedSet != themeSets.cend());
mLegacyMode = selectedSet->second.capabilities.legacyTheme;
if (mLegacyMode) {
legacyOnThemeChanged(theme);