Work on "Single Line Length" label color

Only color when Max Number Of Lines or Max Chars/Line is exceeded.

No need to color it if the lines are bigger than 4 but still under or equal to the allowed max number of lines.
This commit is contained in:
OmrSi 2020-09-07 06:16:55 +03:00
parent ddee820373
commit 4ce169ec4d

View File

@ -639,14 +639,13 @@ namespace Nikse.SubtitleEdit.Logic
if (i > max)
{
label.ForeColor = Color.Red;
sb.Append("...");
label.Text = sb.ToString();
return;
}
sb.Append(line.Length);
if (line.Length > Configuration.Settings.General.SubtitleLineMaximumLength)
if (line.Length > Configuration.Settings.General.SubtitleLineMaximumLength || i >= Configuration.Settings.General.MaxNumberOfLines)
{
label.ForeColor = Color.Red;
}
@ -670,7 +669,6 @@ namespace Nikse.SubtitleEdit.Logic
if (i > max)
{
label.ForeColor = Color.Red;
sb.Append("...");
label.Text = sb.ToString();
return;