mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-25 20:52:44 +01:00
Use Utilities.FixLargeFonts (Forms/RemoveTextFromHearImpaired)
This commit is contained in:
parent
cc055b1d95
commit
88c9c2ae9d
@ -61,18 +61,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
listViewFixes.Columns[3].Text = Configuration.Settings.Language.General.After;
|
||||
buttonOK.Text = Configuration.Settings.Language.General.Ok;
|
||||
buttonCancel.Text = Configuration.Settings.Language.General.Cancel;
|
||||
FixLargeFonts();
|
||||
}
|
||||
|
||||
private void FixLargeFonts()
|
||||
{
|
||||
var graphics = CreateGraphics();
|
||||
var textSize = graphics.MeasureString(buttonOK.Text, Font);
|
||||
if (textSize.Height > buttonOK.Height - 4)
|
||||
{
|
||||
int newButtonHeight = (int)(textSize.Height + 7 + 0.5);
|
||||
Utilities.SetButtonHeight(this, newButtonHeight, 1);
|
||||
}
|
||||
Utilities.FixLargeFonts(this, buttonOK);
|
||||
}
|
||||
|
||||
public void Initialize(Subtitle subtitle)
|
||||
|
Loading…
Reference in New Issue
Block a user