[UiUtil] - Round measured text's height

This commit is contained in:
Ivandro Ismael 2016-03-20 23:29:47 +00:00
parent f7327f1c76
commit ec0539b350

View File

@ -342,8 +342,7 @@ namespace Nikse.SubtitleEdit.Logic
SizeF textSize = graphics.MeasureString(ctrl.Text, ctrl.Font);
if (textSize.Height > ctrl.Height - 4)
{
int newButtonHeight = (int)(textSize.Height + 7.5);
SetButtonHeight(mainCtrl, newButtonHeight, 1);
SetButtonHeight(mainCtrl, (int)Math.Round(textSize.Height + 7.5), 1);
}
}
}