Merge pull request #4355 from OmrSi/color-single-line-length-label

Work on "Single Line Length" label color
This commit is contained in:
Nikolaj Olsson 2020-09-07 08:33:21 +02:00 committed by GitHub
commit df360d2588
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;