Browse Source

[qt] move addons row to rightmost side (#2610)

This is because the rightmost row is "extended" to the rest of the table, and add-ons have long names, play time doesn't need that much space.

Signed-off-by: lizzie <lizzie@eden-emu.dev>

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2610
Reviewed-by: crueter <crueter@eden-emu.dev>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Co-authored-by: lizzie <lizzie@eden-emu.dev>
Co-committed-by: lizzie <lizzie@eden-emu.dev>
pull/2602/head
lizzie 3 months ago
committed by crueter
parent
commit
ecb811ad04
No known key found for this signature in database GPG Key ID: 425ACD2D4830EBC6
  1. 4
      src/yuzu/game_list.h
  2. 40
      src/yuzu/game_list_worker.cpp

4
src/yuzu/game_list.h

@ -58,11 +58,11 @@ class GameList : public QWidget {
public: public:
enum { enum {
COLUMN_NAME, COLUMN_NAME,
COLUMN_COMPATIBILITY,
COLUMN_ADD_ONS,
COLUMN_FILE_TYPE, COLUMN_FILE_TYPE,
COLUMN_SIZE, COLUMN_SIZE,
COLUMN_PLAY_TIME, COLUMN_PLAY_TIME,
COLUMN_ADD_ONS,
COLUMN_COMPATIBILITY,
COLUMN_COUNT, // Number of columns COLUMN_COUNT, // Number of columns
}; };

40
src/yuzu/game_list_worker.cpp

@ -204,36 +204,24 @@ QList<QStandardItem*> MakeGameListEntry(const std::string& path,
const PlayTime::PlayTimeManager& play_time_manager, const PlayTime::PlayTimeManager& play_time_manager,
const FileSys::PatchManager& patch) const FileSys::PatchManager& patch)
{ {
const auto it = FindMatchingCompatibilityEntry(compatibility_list, program_id);
// The game list uses this as compatibility number for untested games
QString compatibility{QStringLiteral("99")};
if (it != compatibility_list.end()) {
compatibility = it->second.first;
}
const auto file_type = loader.GetFileType();
const auto file_type_string = QString::fromStdString(Loader::GetFileTypeString(file_type));
QList<QStandardItem*> list{
new GameListItemPath(FormatGameName(path), icon, QString::fromStdString(name),
file_type_string, program_id),
new GameListItemCompat(compatibility),
auto const it = FindMatchingCompatibilityEntry(compatibility_list, program_id);
// The game list uses 99 as compatibility number for untested games
QString compatibility = it != compatibility_list.end() ? it->second.first : QStringLiteral("99");
auto const file_type = loader.GetFileType();
auto const file_type_string = QString::fromStdString(Loader::GetFileTypeString(file_type));
QString patch_versions = GetGameListCachedObject(fmt::format("{:016X}", patch.GetTitleID()), "pv.txt", [&patch, &loader] {
return FormatPatchNameVersions(patch, loader, loader.IsRomFSUpdatable());
});
return QList<QStandardItem*>{
new GameListItemPath(FormatGameName(path), icon, QString::fromStdString(name), file_type_string, program_id),
new GameListItem(file_type_string), new GameListItem(file_type_string),
new GameListItemSize(size), new GameListItemSize(size),
new GameListItemPlayTime(play_time_manager.GetPlayTime(program_id)), new GameListItemPlayTime(play_time_manager.GetPlayTime(program_id)),
new GameListItem(patch_versions),
new GameListItemCompat(compatibility),
}; };
QString patch_versions;
patch_versions = GetGameListCachedObject(
fmt::format("{:016X}", patch.GetTitleID()), "pv.txt", [&patch, &loader] {
return FormatPatchNameVersions(patch, loader, loader.IsRomFSUpdatable());
});
list.insert(2, new GameListItem(patch_versions));
return list;
} }
} // Anonymous namespace } // Anonymous namespace

Loading…
Cancel
Save