Skip to content

Commit

Permalink
Fix overlapping buttons in Virtual Pads on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
YoshiRulz committed Oct 14, 2024
1 parent a08cb73 commit 478fc58
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/BizHawk.Client.EmuHawk/tools/VirtualPads/VirtualPad.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

using BizHawk.Emulation.Common;
using BizHawk.Client.Common;
using BizHawk.Common;

namespace BizHawk.Client.EmuHawk
{
Expand Down Expand Up @@ -167,6 +168,17 @@ static VirtualPadButton GenVirtualPadButton(InputManager inputManager, ButtonSch
_ => 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()
Expand Down

0 comments on commit 478fc58

Please sign in to comment.