Fixed an issue where the gamelistInfo field was displayed on themes that didn't support it.

This commit is contained in:
Leon Styhre 2021-02-01 22:30:30 +01:00
parent b1b58fe90c
commit 2429e1309d
3 changed files with 15 additions and 0 deletions

View file

@ -176,6 +176,11 @@ void DetailedGameListView::onThemeChanged(const std::shared_ptr<ThemeData>& them
ALL ^ (POSITION | ThemeFlags::SIZE | ThemeFlags::ORIGIN | TEXT | ROTATION)); ALL ^ (POSITION | ThemeFlags::SIZE | ThemeFlags::ORIGIN | TEXT | ROTATION));
mGamelistInfo.applyTheme(theme, getName(), "gamelistInfo", ALL ^ ThemeFlags::TEXT); mGamelistInfo.applyTheme(theme, getName(), "gamelistInfo", ALL ^ ThemeFlags::TEXT);
// If there is no position defined in the theme for gamelistInfo, then hide it.
if (mGamelistInfo.getPosition() == 0)
mGamelistInfo.setVisible(false);
else
mGamelistInfo.setVisible(true);
sortChildren(); sortChildren();
} }

View file

@ -313,6 +313,11 @@ void GridGameListView::onThemeChanged(const std::shared_ptr<ThemeData>& theme)
mGrid.setCursor(file); mGrid.setCursor(file);
mGamelistInfo.applyTheme(theme, getName(), "gamelistInfo", ALL ^ ThemeFlags::TEXT); mGamelistInfo.applyTheme(theme, getName(), "gamelistInfo", ALL ^ ThemeFlags::TEXT);
// If there is no position defined in the theme for gamelistInfo, then hide it.
if (mGamelistInfo.getPosition() == 0)
mGamelistInfo.setVisible(false);
else
mGamelistInfo.setVisible(true);
sortChildren(); sortChildren();
} }

View file

@ -201,6 +201,11 @@ void VideoGameListView::onThemeChanged(const std::shared_ptr<ThemeData>& theme)
ALL ^ (POSITION | ThemeFlags::SIZE | ThemeFlags::ORIGIN | TEXT | ROTATION)); ALL ^ (POSITION | ThemeFlags::SIZE | ThemeFlags::ORIGIN | TEXT | ROTATION));
mGamelistInfo.applyTheme(theme, getName(), "gamelistInfo", ALL ^ ThemeFlags::TEXT); mGamelistInfo.applyTheme(theme, getName(), "gamelistInfo", ALL ^ ThemeFlags::TEXT);
// If there is no position defined in the theme for gamelistInfo, then hide it.
if (mGamelistInfo.getPosition() == 0)
mGamelistInfo.setVisible(false);
else
mGamelistInfo.setVisible(true);
sortChildren(); sortChildren();
} }