From d4d966680d374fb76433cd6decda1c319d1ffd7a Mon Sep 17 00:00:00 2001 From: adelikat Date: Sun, 25 Jan 2015 16:56:18 +0000 Subject: [PATCH] Debugger - tweak positioning of register labels when registers are not settable --- .../tools/Debugger/RegisterBoxControl.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/BizHawk.Client.EmuHawk/tools/Debugger/RegisterBoxControl.cs b/BizHawk.Client.EmuHawk/tools/Debugger/RegisterBoxControl.cs index 1efd2c5094..5e6a4ae271 100644 --- a/BizHawk.Client.EmuHawk/tools/Debugger/RegisterBoxControl.cs +++ b/BizHawk.Client.EmuHawk/tools/Debugger/RegisterBoxControl.cs @@ -146,6 +146,10 @@ namespace BizHawk.Client.EmuHawk var maxCharSize = registers.Where(r => r.Value.BitSize != 1).Max(r => r.Key.Length); var width = maxCharSize * 5; + if (width < 20) + { + width = 20; + } foreach (var register in registers.Where(r => r.Value.BitSize != 1)) { @@ -153,7 +157,7 @@ namespace BizHawk.Client.EmuHawk { Text = register.Key, Location = new Point(UIHelper.ScaleX(5), y + UIHelper.ScaleY(2)), - Size = new Size(UIHelper.ScaleX(width), UIHelper.ScaleY(15)) + Size = new Size(UIHelper.ScaleX(width + 5), UIHelper.ScaleY(15)) }); if (canset) @@ -192,7 +196,7 @@ namespace BizHawk.Client.EmuHawk Name = register.Key, Text = register.Value.Value.ToString(), Size = new Size(UIHelper.ScaleX(6 + ((register.Value.BitSize / 4) * 9)), UIHelper.ScaleY(15)), - Location = new Point(UIHelper.ScaleX(width + 10), y) + Location = new Point(UIHelper.ScaleX(width + 12), y + 2) }); }