From 1e3eb2f0b5cdba0c8095c1ab4e7d14d50f9e329a Mon Sep 17 00:00:00 2001 From: Waldi Ravens Date: Wed, 27 May 2015 10:19:54 +0200 Subject: [PATCH] Use Utilities.FixLargeFonts (Forms/ModifySelection) --- src/Forms/ModifySelection.cs | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/Forms/ModifySelection.cs b/src/Forms/ModifySelection.cs index cdbce7325..8fb1f846e 100644 --- a/src/Forms/ModifySelection.cs +++ b/src/Forms/ModifySelection.cs @@ -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)