From 2429e1309df3832cfce3da2a11f68643ebc19c0b Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Mon, 1 Feb 2021 22:30:30 +0100 Subject: [PATCH] Fixed an issue where the gamelistInfo field was displayed on themes that didn't support it. --- es-app/src/views/gamelist/DetailedGameListView.cpp | 5 +++++ es-app/src/views/gamelist/GridGameListView.cpp | 5 +++++ es-app/src/views/gamelist/VideoGameListView.cpp | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/es-app/src/views/gamelist/DetailedGameListView.cpp b/es-app/src/views/gamelist/DetailedGameListView.cpp index f1d0719ef..fa979b29d 100644 --- a/es-app/src/views/gamelist/DetailedGameListView.cpp +++ b/es-app/src/views/gamelist/DetailedGameListView.cpp @@ -176,6 +176,11 @@ void DetailedGameListView::onThemeChanged(const std::shared_ptr& them ALL ^ (POSITION | ThemeFlags::SIZE | ThemeFlags::ORIGIN | TEXT | ROTATION)); 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(); } diff --git a/es-app/src/views/gamelist/GridGameListView.cpp b/es-app/src/views/gamelist/GridGameListView.cpp index 591f206a8..9e8316249 100644 --- a/es-app/src/views/gamelist/GridGameListView.cpp +++ b/es-app/src/views/gamelist/GridGameListView.cpp @@ -313,6 +313,11 @@ void GridGameListView::onThemeChanged(const std::shared_ptr& theme) mGrid.setCursor(file); 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(); } diff --git a/es-app/src/views/gamelist/VideoGameListView.cpp b/es-app/src/views/gamelist/VideoGameListView.cpp index 55f909e00..b91404f23 100644 --- a/es-app/src/views/gamelist/VideoGameListView.cpp +++ b/es-app/src/views/gamelist/VideoGameListView.cpp @@ -201,6 +201,11 @@ void VideoGameListView::onThemeChanged(const std::shared_ptr& theme) ALL ^ (POSITION | ThemeFlags::SIZE | ThemeFlags::ORIGIN | TEXT | ROTATION)); 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(); }