Skip to content

Commit 063d1e7

Browse files
committed
Make sure new button moves when form gets resized
Signed-off-by: Kláben Szabolcs Bence (Tudi20) <[email protected]>
1 parent 03efed1 commit 063d1e7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Universal THCRAP Launcher/Form1.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ private void Form1_Load(object sender, EventArgs e)
141141
#region Set stuff
142142

143143
//Create constants for resizing
144-
_resizeConstants = new int[8];
144+
_resizeConstants = new int[9];
145145
_resizeConstants[0] = Size.Width - button1.Width;
146146
_resizeConstants[1] = Size.Width - splitContainer1.Width;
147147
_resizeConstants[2] = Size.Height - splitContainer1.Height;
@@ -150,6 +150,7 @@ private void Form1_Load(object sender, EventArgs e)
150150
_resizeConstants[5] = splitContainer1.Location.Y - sort_az_button1.Location.Y;
151151
_resizeConstants[6] = sort_az_button2.Location.X - listBox1.Size.Width;
152152
_resizeConstants[7] = star_button2.Location.X - sort_az_button2.Location.X;
153+
_resizeConstants[8] = filterByType_button.Location.X - star_button2.Location.X;
153154

154155
#endregion
155156

@@ -380,6 +381,8 @@ private void Form1_Resize(object sender, EventArgs e)
380381
new Point(star_button1.Location.X, splitContainer1.Location.Y - _resizeConstants[5]);
381382
star_button2.Location = new Point(sort_az_button2.Location.X + _resizeConstants[7],
382383
splitContainer1.Location.Y - _resizeConstants[5]);
384+
filterByType_button.Location = new Point(
385+
star_button2.Location.X + _resizeConstants[8], filterByType_button.Location.Y);
383386
}
384387

385388
private void label1_Click(object sender, EventArgs e) => Process.Start("https://github.com/Tudi20/Universal-THCRAP-Launcher");

0 commit comments

Comments
 (0)