Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small text/number formatting changes to mod list #2658

Merged
merged 1 commit into from
Jan 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Core/Types/CkanModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -737,11 +737,11 @@ public static string FmtSize(long bytes)
if (bytes < K) {
return $"{bytes} B";
} else if (bytes < K * K) {
return $"{bytes / K :N1} KB";
return $"{bytes / K :N1} KiB";
} else if (bytes < K * K * K) {
return $"{bytes / K / K :N1} MB";
return $"{bytes / K / K :N1} MiB";
} else {
return $"{bytes / K / K / K :N1} GB";
return $"{bytes / K / K / K :N1} GiB";
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions GUI/Main.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions GUI/MainModList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -810,11 +810,11 @@ private DataGridViewRow MakeRow(GUIMod mod, List<ModChange> changes, bool hideEp
: mod.LatestVersion)
};

var compat = new DataGridViewTextBoxCell() { Value = mod.KSPCompatibility };
var size = new DataGridViewTextBoxCell() { Value = mod.DownloadSize };
var installDate = new DataGridViewTextBoxCell() { Value = mod.InstallDate };
var downloadCount = new DataGridViewTextBoxCell() { Value = mod.DownloadCount };
var desc = new DataGridViewTextBoxCell() { Value = mod.Abstract };
var downloadCount = new DataGridViewTextBoxCell() { Value = String.Format("{0:N0}", mod.DownloadCount) };
var compat = new DataGridViewTextBoxCell() { Value = mod.KSPCompatibility };
var size = new DataGridViewTextBoxCell() { Value = mod.DownloadSize };
var installDate = new DataGridViewTextBoxCell() { Value = mod.InstallDate };
var desc = new DataGridViewTextBoxCell() { Value = mod.Abstract };

item.Cells.AddRange(selecting, updating, name, author, installVersion, latestVersion, compat, size, installDate, downloadCount, desc);

Expand Down