This commit is contained in:
adelikat 2019-10-27 10:55:06 -05:00
commit d9a160a9af
1 changed files with 7 additions and 1 deletions
BizHawk.Client.EmuHawk/CustomControls/InputRoll

View File

@ -91,7 +91,13 @@ namespace BizHawk.Client.EmuHawk
using (var g = CreateGraphics())
using (_renderer.LockGraphics(g, Width, Height))
{
_charSize = _renderer.MeasureString("A", _font); // TODO make this a property so changing it updates other values.
// Set font
_renderer.PrepDrawString(_font, _foreColor);
// Measure width change to ignore extra padding at start/end
var size1 = _renderer.MeasureString("A", _font);
var size2 = _renderer.MeasureString("AA", _font);
_charSize = new Size(size2.Width - size1.Width, size1.Height); // TODO make this a property so changing it updates other values.
}
UpdateCellSize();