Skip to content

Commit

Permalink
Merge #2658 Small text/number formatting changes to mod list
Browse files Browse the repository at this point in the history
  • Loading branch information
politas committed Jan 14, 2019
2 parents ea72f54 + fd85673 commit 9729b75
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ All notable changes to this project will be documented in this file.
- [GUI] Don't try to update filters if mod list missing (#2654 by: HebaruSan; reviewed: politas)
- [GUI] Invoke control accesses in UpdateModsList (#2656 by: DasSkelett; reviewed: politas)
- [GUI] Set focus to mod list after loading (#2657 by: HebaruSan; reviewed: politas)
- [GUI] Small text/number formatting changes to mod list (#2658 by: DasSkelett; reviewed: politas)

## v1.25.4 Kennedy

Expand Down
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 @@ -818,11 +818,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

0 comments on commit 9729b75

Please sign in to comment.