Skip to content

Commit

Permalink
Fixed issue with non-factors of 120
Browse files Browse the repository at this point in the history
  • Loading branch information
Sawrr committed Jun 25, 2019
1 parent 3a7f4d7 commit f85a8bf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
11 changes: 9 additions & 2 deletions AchievementsTracker/AchievementsTracker/ImgForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,19 @@ public void ArrangeUnlockables()
picBox.Size = new Size(imageSize, imageSize);
}

// Handle remainder
int remainder = 0;
if (120 % rows != 0)
{
remainder = 1;
}

if (inverted)
{
ClientSize = new Size(imageSize * rows, imageSize * (120 / rows));
ClientSize = new Size(imageSize * rows, imageSize * (120 / rows + remainder));
} else
{
ClientSize = new Size(imageSize * (120 / rows), imageSize * rows);
ClientSize = new Size(imageSize * (120 / rows + remainder), imageSize * rows);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.10.4.0")]
[assembly: AssemblyFileVersion("1.10.4.0")]
[assembly: AssemblyVersion("1.10.5.0")]
[assembly: AssemblyFileVersion("1.10.5.0")]

0 comments on commit f85a8bf

Please sign in to comment.