DolphinQt: Display game list file sizes with an asterisk when file-size differs from volume-size (e.g. when they are compressed).

This commit is contained in:
Jordan Woyak 2019-01-26 20:22:51 -06:00
parent ff5e296576
commit efd5c36773
1 changed files with 9 additions and 1 deletions

View File

@ -135,7 +135,15 @@ QVariant GameListModel::data(const QModelIndex& index, int role) const
break;
case COL_SIZE:
if (role == Qt::DisplayRole)
return QString::fromStdString(UICommon::FormatSize(game.GetFileSize()));
{
std::string str = UICommon::FormatSize(game.GetFileSize());
// Add asterisk to size of compressed files.
if (game.GetFileSize() != game.GetVolumeSize())
str += '*';
return QString::fromStdString(str);
}
if (role == Qt::InitialSortOrderRole)
return static_cast<quint64>(game.GetFileSize());
break;