Use Utilities.FixLargeFonts (Forms/ModifySelection)

This commit is contained in:
Waldi Ravens 2015-05-27 10:19:54 +02:00
parent ce450098ac
commit 1e3eb2f0b5

View File

@ -45,7 +45,7 @@ namespace Nikse.SubtitleEdit.Forms
columnHeaderLine.Text = Configuration.Settings.Language.General.LineNumber;
columnHeaderText.Text = Configuration.Settings.Language.General.Text;
FixLargeFonts();
Utilities.FixLargeFonts(this, buttonOK);
comboBoxRule.Items.Clear();
comboBoxRule.Items.Add(Configuration.Settings.Language.ModifySelection.Contains);
@ -72,17 +72,6 @@ namespace Nikse.SubtitleEdit.Forms
Preview();
}
private void FixLargeFonts()
{
Graphics graphics = this.CreateGraphics();
SizeF textSize = graphics.MeasureString(buttonOK.Text, this.Font);
if (textSize.Height > buttonOK.Height - 4)
{
int newButtonHeight = (int)(textSize.Height + 7 + 0.5);
Utilities.SetButtonHeight(this, newButtonHeight, 1);
}
}
private void ModifySelection_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Escape)