mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-28 06:52:35 +01:00
Release Graphics resources (Forms/Settings)
This commit is contained in:
parent
6368b8bd0a
commit
4482d85954
@ -814,14 +814,16 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
|
||||
private void FixLargeFonts()
|
||||
{
|
||||
var graphics = CreateGraphics();
|
||||
var textSize = graphics.MeasureString(buttonOK.Text, Font);
|
||||
if (textSize.Height > buttonOK.Height - 4)
|
||||
using (var graphics = CreateGraphics())
|
||||
{
|
||||
int newButtonHeight = (int)(textSize.Height + 7 + 0.5);
|
||||
Utilities.SetButtonHeight(this, newButtonHeight, 1);
|
||||
Utilities.SetButtonHeight(groupBoxSsaStyle, newButtonHeight, 2);
|
||||
Utilities.SetButtonHeight(groupBoxWaveformAppearence, newButtonHeight, 1);
|
||||
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.SetButtonHeight(groupBoxSsaStyle, newButtonHeight, 2);
|
||||
Utilities.SetButtonHeight(groupBoxWaveformAppearence, newButtonHeight, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user