diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ed4c21043..94c3337f27 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/Core/Types/CkanModule.cs b/Core/Types/CkanModule.cs index 44d0331b28..2d678013ea 100644 --- a/Core/Types/CkanModule.cs +++ b/Core/Types/CkanModule.cs @@ -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"; } } } diff --git a/GUI/Main.Designer.cs b/GUI/Main.Designer.cs index 2a17ec8c9a..fbfc68b4cb 100644 --- a/GUI/Main.Designer.cs +++ b/GUI/Main.Designer.cs @@ -612,6 +612,7 @@ private void InitializeComponent() this.SizeCol.Name = "SizeCol"; this.SizeCol.ReadOnly = true; this.SizeCol.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Programmatic; + this.SizeCol.DefaultCellStyle.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight; // // InstallDate // @@ -627,6 +628,7 @@ private void InitializeComponent() this.DownloadCount.Name = "DownloadCount"; this.DownloadCount.ReadOnly = true; this.DownloadCount.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Programmatic; + this.DownloadCount.DefaultCellStyle.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight; this.DownloadCount.Width = 70; // // Description diff --git a/GUI/MainModList.cs b/GUI/MainModList.cs index 1e980298bd..93303e29d2 100644 --- a/GUI/MainModList.cs +++ b/GUI/MainModList.cs @@ -818,11 +818,11 @@ private DataGridViewRow MakeRow(GUIMod mod, List 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);