Fix overlapping buttons in Virtual Pads on Linux

This commit is contained in:
YoshiRulz 2024-10-14 18:13:37 +10:00
parent a08cb73a30
commit 478fc58a5d
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
1 changed files with 12 additions and 0 deletions

View File

@ -5,6 +5,7 @@ using System.Windows.Forms;
using BizHawk.Emulation.Common;
using BizHawk.Client.Common;
using BizHawk.Common;
namespace BizHawk.Client.EmuHawk
{
@ -167,6 +168,17 @@ namespace BizHawk.Client.EmuHawk
_ => throw new InvalidOperationException()
});
}
if (OSTailoredCode.IsUnixHost)
{
PadBox.PerformLayout();
foreach (var c in PadBox.Controls().Where(static c => c is CheckBox { Image: null }))
{
var size = c.Size;
size.Width -= UIHelper.ScaleX(8);
c.AutoSize = false;
c.Size = size;
}
}
}
public void Clear()