Use UIHelper in FormsLuaLibrary (resolves #2604)

This commit is contained in:
YoshiRulz 2021-03-19 12:26:10 +10:00
parent 62ddd6495e
commit 611d1bfaa1
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
1 changed files with 3 additions and 7 deletions

View File

@ -34,14 +34,10 @@ namespace BizHawk.Client.EmuHawk
} }
private static void SetLocation(Control control, int x, int y) private static void SetLocation(Control control, int x, int y)
{ => control.Location = UIHelper.Scale(new Point(x, y));
control.Location = new Point(x, y);
}
private static void SetSize(Control control, int width, int height) private static void SetSize(Control control, int width, int height)
{ => control.Size = UIHelper.Scale(new Size(width, height));
control.Size = new Size(width, height);
}
private static void SetText(Control control, string caption) private static void SetText(Control control, string caption)
{ {
@ -350,7 +346,7 @@ namespace BizHawk.Client.EmuHawk
_luaForms.Add(form); _luaForms.Add(form);
if (width.HasValue && height.HasValue) if (width.HasValue && height.HasValue)
{ {
form.Size = new Size(width.Value, height.Value); form.Size = UIHelper.Scale(new Size(width.Value, height.Value));
} }
form.Text = title; form.Text = title;