diff options
author | Malte Jürgens <maltejur@web.de> | 2021-08-01 16:59:36 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-01 12:59:36 -0400 |
commit | 381aacdbb1a5ecc41c742adf22666de97068d9c6 (patch) | |
tree | 971850662fdf87010a699fad9023e36f1634a665 /src/yuzu/game_list_p.h | |
parent | d20bcb7fafb599891b0729d8231ce8247e0179d3 (diff) |
game_list: Make game list folder icons smaller (#6762)
Makes the default game list folder icons 48x48 by default instead of 64x64, and allows for selecting small (24x24) and large (72x72) icon sizes.
Diffstat (limited to 'src/yuzu/game_list_p.h')
-rw-r--r-- | src/yuzu/game_list_p.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/yuzu/game_list_p.h b/src/yuzu/game_list_p.h index 982c0789d..9dc3cc7c3 100644 --- a/src/yuzu/game_list_p.h +++ b/src/yuzu/game_list_p.h @@ -80,7 +80,7 @@ public: setData(qulonglong(program_id), ProgramIdRole); setData(game_type, FileTypeRole); - const u32 size = UISettings::values.icon_size.GetValue(); + const u32 size = UISettings::values.game_icon_size.GetValue(); QPixmap picture; if (!picture.loadFromData(picture_data.data(), static_cast<u32>(picture_data.size()))) { @@ -233,8 +233,7 @@ public: UISettings::GameDir* game_dir = &directory; setData(QVariant(UISettings::values.game_dirs.indexOf(directory)), GameDirRole); - const int icon_size = - std::min(static_cast<int>(UISettings::values.icon_size.GetValue()), 64); + const int icon_size = UISettings::values.folder_icon_size.GetValue(); switch (dir_type) { case GameListItemType::SdmcDir: setData( @@ -295,8 +294,8 @@ public: explicit GameListAddDir() { setData(type(), TypeRole); - const int icon_size = - std::min(static_cast<int>(UISettings::values.icon_size.GetValue()), 64); + const int icon_size = UISettings::values.folder_icon_size.GetValue(); + setData(QIcon::fromTheme(QStringLiteral("plus")) .pixmap(icon_size) .scaled(icon_size, icon_size, Qt::IgnoreAspectRatio, Qt::SmoothTransformation), @@ -318,8 +317,8 @@ public: explicit GameListFavorites() { setData(type(), TypeRole); - const int icon_size = - std::min(static_cast<int>(UISettings::values.icon_size.GetValue()), 64); + const int icon_size = UISettings::values.folder_icon_size.GetValue(); + setData(QIcon::fromTheme(QStringLiteral("star")) .pixmap(icon_size) .scaled(icon_size, icon_size, Qt::IgnoreAspectRatio, Qt::SmoothTransformation), |