mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-10-06 00:02:44 +02:00
[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>
This commit is contained in:
@@ -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
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -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);
|
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");
|
||||||
|
|
||||||
// The game list uses this as compatibility number for untested games
|
auto const file_type = loader.GetFileType();
|
||||||
QString compatibility{QStringLiteral("99")};
|
auto const file_type_string = QString::fromStdString(Loader::GetFileTypeString(file_type));
|
||||||
if (it != compatibility_list.end()) {
|
|
||||||
compatibility = it->second.first;
|
|
||||||
}
|
|
||||||
|
|
||||||
const auto file_type = loader.GetFileType();
|
QString patch_versions = GetGameListCachedObject(fmt::format("{:016X}", patch.GetTitleID()), "pv.txt", [&patch, &loader] {
|
||||||
const auto file_type_string = QString::fromStdString(Loader::GetFileTypeString(file_type));
|
return FormatPatchNameVersions(patch, loader, loader.IsRomFSUpdatable());
|
||||||
|
});
|
||||||
QList<QStandardItem*> list{
|
return QList<QStandardItem*>{
|
||||||
new GameListItemPath(FormatGameName(path), icon, QString::fromStdString(name),
|
new GameListItemPath(FormatGameName(path), icon, QString::fromStdString(name), file_type_string, program_id),
|
||||||
file_type_string, program_id),
|
|
||||||
new GameListItemCompat(compatibility),
|
|
||||||
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
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user