mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-28 23:12:34 +01:00
[UiUtil] - Round measured text's height
This commit is contained in:
parent
f7327f1c76
commit
ec0539b350
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user