InputRoll - fix a few places where total width was used instead of clip rectangle

This commit is contained in:
adelikat 2019-12-10 12:36:10 -06:00
parent 599415c848
commit c70d2e5cd8
1 changed files with 6 additions and 3 deletions

View File

@ -370,8 +370,8 @@ namespace BizHawk.Client.EmuHawk
// Gray column box and black line underneath
_renderer.FillRectangle(new Rectangle(0, 0, rect.Width, bottomEdge + 1));
_renderer.Line(0, 0, TotalColWidth, 0);
_renderer.Line(0, bottomEdge, TotalColWidth, bottomEdge);
_renderer.Line(0, 0, rect.Width, 0);
_renderer.Line(0, bottomEdge, rect.Width, bottomEdge);
// Vertical black separators
foreach (var column in visibleColumns)
@ -384,7 +384,10 @@ namespace BizHawk.Client.EmuHawk
if (visibleColumns.Any())
{
int right = TotalColWidth - _hBar.Value;
_renderer.Line(right, 0, right, bottomEdge);
if (right <= rect.Left + rect.Width)
{
_renderer.Line(right, 0, right, bottomEdge);
}
}
}