Qt: Add gear icon to disc games with user settings

This commit is contained in:
Connor McLaughlin 2021-06-05 13:44:05 +10:00
parent e536674f80
commit ad9712afca
5 changed files with 5 additions and 1 deletions

View file

@ -290,7 +290,7 @@ QVariant GameListModel::data(const QModelIndex& index, int role) const
switch (ge.type)
{
case GameListEntryType::Disc:
return m_type_disc_pixmap;
return ((ge.settings.GetUserSettingsCount() > 0) ? m_type_disc_with_settings_pixmap : m_type_disc_pixmap);
case GameListEntryType::Playlist:
return m_type_playlist_pixmap;
case GameListEntryType::PSF:
@ -517,6 +517,7 @@ void GameListModel::loadCommonImages()
{
// TODO: Use svg instead of png
m_type_disc_pixmap = QIcon(QStringLiteral(":/icons/media-optical-24.png")).pixmap(QSize(24, 24));
m_type_disc_with_settings_pixmap = QIcon(QStringLiteral(":/icons/media-optical-gear-24.png")).pixmap(QSize(24, 24));
m_type_exe_pixmap = QIcon(QStringLiteral(":/icons/applications-system-24.png")).pixmap(QSize(24, 24));
m_type_playlist_pixmap = QIcon(QStringLiteral(":/icons/address-book-new-22.png")).pixmap(QSize(22, 22));
m_type_psf_pixmap = QIcon(QStringLiteral(":/icons/multimedia-player.png")).pixmap(QSize(22, 22));

View file

@ -72,6 +72,7 @@ private:
std::array<QString, Column_Count> m_column_display_names;
QPixmap m_type_disc_pixmap;
QPixmap m_type_disc_with_settings_pixmap;
QPixmap m_type_exe_pixmap;
QPixmap m_type_playlist_pixmap;
QPixmap m_type_psf_pixmap;

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View file

@ -119,6 +119,8 @@
<file>icons/media-flash@2x.png</file>
<file>icons/media-optical-24.png</file>
<file>icons/media-optical-24@2x.png</file>
<file>icons/media-optical-gear-24.png</file>
<file>icons/media-optical-gear-24@2x.png</file>
<file>icons/media-optical.png</file>
<file>icons/media-optical@2x.png</file>
<file>icons/media-playback-pause.png</file>