Merge pull request #1655 from campbeb/issue1651

Lock Greenshot icon sizes to multiples of 8
This commit is contained in:
Jaex 2016-06-22 02:04:39 +03:00 committed by GitHub
commit c938550f6c
2 changed files with 23 additions and 2 deletions

View file

@ -291,7 +291,7 @@ public Size IconSize
{
newSize.Width = 256;
}
newSize.Width = (newSize.Width / 16) * 16;
newSize.Width = (newSize.Width / 8) * 8;
if (newSize.Height < 16)
{
newSize.Height = 16;
@ -300,7 +300,7 @@ public Size IconSize
{
newSize.Height = 256;
}
newSize.Height = (newSize.Height / 16) * 16;
newSize.Height = (newSize.Height / 8) * 8;
}
if (_iconSize != newSize)
{

View file

@ -49,11 +49,32 @@ private void InitializeComponent()
//
// nudIconSize
//
this.nudIconSize.Increment = new decimal(new int[] {
8,
0,
0,
0});
this.nudIconSize.Location = new System.Drawing.Point(72, 12);
this.nudIconSize.Maximum = new decimal(new int[] {
256,
0,
0,
0});
this.nudIconSize.Minimum = new decimal(new int[] {
16,
0,
0,
0});
this.nudIconSize.Name = "nudIconSize";
this.nudIconSize.ReadOnly = true;
this.nudIconSize.Size = new System.Drawing.Size(48, 20);
this.nudIconSize.TabIndex = 1;
this.nudIconSize.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.nudIconSize.Value = new decimal(new int[] {
16,
0,
0,
0});
//
// cbMatchSizeToCapture
//