From c70d2e5cd879eac27e7e6dd5469b2fb90463e9f8 Mon Sep 17 00:00:00 2001 From: adelikat Date: Tue, 10 Dec 2019 12:36:10 -0600 Subject: [PATCH] InputRoll - fix a few places where total width was used instead of clip rectangle --- .../CustomControls/InputRoll/InputRoll.Drawing.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/BizHawk.Client.EmuHawk/CustomControls/InputRoll/InputRoll.Drawing.cs b/BizHawk.Client.EmuHawk/CustomControls/InputRoll/InputRoll.Drawing.cs index 3abd8f1fa8..325a290b84 100644 --- a/BizHawk.Client.EmuHawk/CustomControls/InputRoll/InputRoll.Drawing.cs +++ b/BizHawk.Client.EmuHawk/CustomControls/InputRoll/InputRoll.Drawing.cs @@ -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); + } } }