Use Utilities.FixLargeFonts (Forms/MergeTextWithSameTimeCodes)

This commit is contained in:
Waldi Ravens 2015-05-27 10:23:06 +02:00
parent 88c9c2ae9d
commit ed51745a6c

View File

@ -17,17 +17,6 @@ namespace Nikse.SubtitleEdit.Forms
private string _language;
private Dictionary<int, bool> _isFixAllowedList = new Dictionary<int, bool>();
private void FixLargeFonts()
{
var graphics = CreateGraphics();
var textSize = graphics.MeasureString(buttonOK.Text, Font);
if (textSize.Height > buttonOK.Height - 4)
{
var newButtonHeight = (int)(textSize.Height + 7 + 0.5);
Utilities.SetButtonHeight(this, newButtonHeight, 1);
}
}
public Subtitle MergedSubtitle
{
get { return _mergedSubtitle; }
@ -39,7 +28,8 @@ namespace Nikse.SubtitleEdit.Forms
_previewTimer.Tick += previewTimer_Tick;
_previewTimer.Interval = 250;
FixLargeFonts();
Utilities.FixLargeFonts(this, buttonOK);
}
public void Initialize(Subtitle subtitle)