Use LuaPictureBox' custom resize in all cases

This commit is contained in:
YoshiRulz 2023-02-26 14:35:35 +10:00
parent 2c3fb68776
commit 1a30f6551e
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
1 changed files with 5 additions and 1 deletions

View File

@ -42,7 +42,11 @@ namespace BizHawk.Client.EmuHawk
=> control.Location = UIHelper.Scale(new Point(x, y));
private static void SetSize(Control control, int width, int height)
=> control.Size = UIHelper.Scale(new Size(width, height));
{
var scaled = UIHelper.Scale(new Size(width, height));
if (control is LuaPictureBox lpb) lpb.LuaResize(scaled.Width, scaled.Height);
else control.Size = scaled;
}
private static void SetText(Control control, string caption)
=> control.Text = caption ?? string.Empty;