Qt: Show memory card icons in game list

You can disable it if you really hate it.
This commit is contained in:
Stenzek
2024-07-09 21:00:47 +10:00
parent 8659c8cca6
commit 9143116616
8 changed files with 119 additions and 23 deletions

View File

@@ -114,7 +114,8 @@ void GameListWidget::initialize()
const float cover_scale = Host::GetBaseFloatSettingValue("UI", "GameListCoverArtScale", 0.45f);
const bool show_cover_titles = Host::GetBaseBoolSettingValue("UI", "GameListShowCoverTitles", true);
const bool merge_disc_sets = Host::GetBaseBoolSettingValue("UI", "GameListMergeDiscSets", true);
m_model = new GameListModel(cover_scale, show_cover_titles, this);
const bool show_game_icons = Host::GetBaseBoolSettingValue("UI", "GameListShowGameIcons", true);
m_model = new GameListModel(cover_scale, show_cover_titles, show_game_icons, this);
m_model->updateCacheSize(width(), height());
m_sort_model = new GameListSortModel(m_model);
@@ -242,6 +243,11 @@ bool GameListWidget::isMergingDiscSets() const
return m_sort_model->isMergingDiscSets();
}
bool GameListWidget::isShowingGameIcons() const
{
return m_model->getShowGameIcons();
}
void GameListWidget::refresh(bool invalidate_cache)
{
cancelRefresh();
@@ -476,6 +482,16 @@ void GameListWidget::setMergeDiscSets(bool enabled)
emit layoutChange();
}
void GameListWidget::setShowGameIcons(bool enabled)
{
if (m_model->getShowGameIcons() == enabled)
return;
Host::SetBaseBoolSettingValue("UI", "GameListShowGameIcons", enabled);
Host::CommitBaseSettingChanges();
m_model->setShowGameIcons(enabled);
}
void GameListWidget::updateToolbar()
{
const bool grid_view = isShowingGameGrid();