Minor work on #6847 - thx OmrSi :)

This commit is contained in:
niksedk 2023-04-20 08:17:16 +02:00
parent 42c9b86817
commit a8b4503891
7 changed files with 434 additions and 437 deletions

View File

@ -64,6 +64,7 @@
<OverlapPreviousLineX>Overlap prev line ({0:#,##0.###})</OverlapPreviousLineX>
<OverlapX>Overlap ({0:#,##0.###})</OverlapX>
<OverlapNextX>Overlap next ({0:#,##0.###})</OverlapNextX>
<OverlapStartAndEnd>Overlap start and end</OverlapStartAndEnd>
<Negative>Negative</Negative>
<RegularExpressionIsNotValid>Regular expression is not valid!</RegularExpressionIsNotValid>
<CurrentSubtitle>Current subtitle</CurrentSubtitle>

File diff suppressed because it is too large Load Diff

View File

@ -295,8 +295,8 @@ namespace Nikse.SubtitleEdit.Forms
numericUpDownDuration.Left = timeUpDownStartTime.Right + 15;
numericUpDownDuration.Width += 5;
labelDuration.Left = numericUpDownDuration.Left - 3;
}
labelDuration.Left = numericUpDownDuration.Left;
var xDiff = timeUpDownStartTime.Top - (labelStartTime.Top + labelStartTime.Height);
if (xDiff < 0) // DPI auto-size fixes: see https://github.com/SubtitleEdit/subtitleedit/issues/3981
@ -381,7 +381,6 @@ namespace Nikse.SubtitleEdit.Forms
labelCharactersPerSecond.Text = string.Empty;
labelTextLineTotal.Text = string.Empty;
labelStartTimeWarning.Text = string.Empty;
labelDurationWarning.Text = string.Empty;
labelVideoInfo.Text = string.Empty;
labelSingleLine.Text = string.Empty;
labelSingleLinePixels.Text = string.Empty;
@ -621,9 +620,6 @@ namespace Nikse.SubtitleEdit.Forms
timeUpDownStartTime.SetAutoWidth();
numericUpDownDuration.Left = timeUpDownStartTime.Right + 4;
labelDurationWarning.Left = numericUpDownDuration.Left;
labelDuration.Left = labelDurationWarning.Left;
timeUpDownVideoPosition.SetAutoWidth();
timeUpDownVideoPositionAdjust.SetAutoWidth();
@ -5217,7 +5213,6 @@ namespace Nikse.SubtitleEdit.Forms
SetCurrentFormat(Configuration.Settings.General.DefaultSubtitleFormat);
labelStartTimeWarning.Text = string.Empty;
labelDurationWarning.Text = string.Empty;
Configuration.Settings.General.CurrentVideoOffsetInMs = 0;
Configuration.Settings.General.CurrentVideoIsSmpte = false;
@ -9696,7 +9691,6 @@ namespace Nikse.SubtitleEdit.Forms
if (_subtitle.Paragraphs.Count == 0)
{
labelStartTimeWarning.Text = string.Empty;
labelDurationWarning.Text = string.Empty;
_subtitleListViewIndex = -1;
textBoxListViewText.Text = string.Empty;
textBoxListViewTextOriginal.Text = string.Empty;
@ -12605,15 +12599,26 @@ namespace Nikse.SubtitleEdit.Forms
}
}
labelStartTimeWarning.Text = startTimeWarning;
labelDurationWarning.Text = durationWarning;
labelDurationWarning.Left = numericUpDownDuration.Left;
if (!string.IsNullOrEmpty(startTimeWarning) && !string.IsNullOrEmpty(durationWarning))
{
labelStartTimeWarning.Text = "Overlap";
labelDurationWarning.Text = "Overlap";
labelStartTimeWarning.TextAlign = ContentAlignment.TopLeft;
labelStartTimeWarning.Text = _languageGeneral.OverlapStartAndEnd;
ShowStatus(startTimeWarning + " " + durationWarning, false, 4, true);
}
else if (!string.IsNullOrEmpty(startTimeWarning))
{
labelStartTimeWarning.TextAlign = ContentAlignment.TopLeft;
labelStartTimeWarning.Text = startTimeWarning;
}
else if (!string.IsNullOrEmpty(durationWarning))
{
labelStartTimeWarning.TextAlign = ContentAlignment.TopRight;
labelStartTimeWarning.Text = durationWarning;
}
else
{
labelStartTimeWarning.Text = string.Empty;
}
}
private double _durationMsInitialValue = 0;
@ -22880,7 +22885,7 @@ namespace Nikse.SubtitleEdit.Forms
groupBoxEdit.Height += adjustUp;
numericUpDownDuration.Left = timeUpDownStartTime.Left + timeUpDownStartTime.Width;
numericUpDownDuration.Width += 5;
labelDuration.Left = numericUpDownDuration.Left - 3;
labelDuration.Left = numericUpDownDuration.Left;
// Video controls - Create
timeUpDownVideoPosition.Left = labelVideoPosition.Left + labelVideoPosition.Width;

View File

@ -857,7 +857,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAD2
CAAAAk1TRnQBSQFMAgEBAgEAAaQBLgGkAS4BEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
CAAAAk1TRnQBSQFMAgEBAgEAAawBLgGsAS4BEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA

View File

@ -195,6 +195,7 @@ namespace Nikse.SubtitleEdit.Logic
OverlapPreviousLineX = "Overlap prev line ({0:#,##0.###})",
OverlapX = "Overlap ({0:#,##0.###})",
OverlapNextX = "Overlap next ({0:#,##0.###})",
OverlapStartAndEnd = "Overlap start and end",
Negative = "Negative",
RegularExpressionIsNotValid = "Regular expression is not valid!",
CurrentSubtitle = "Current subtitle",

View File

@ -247,6 +247,9 @@ namespace Nikse.SubtitleEdit.Logic
case "General/OverlapNextX":
language.General.OverlapNextX = reader.Value;
break;
case "General/OverlapStartAndEnd":
language.General.OverlapStartAndEnd = reader.Value;
break;
case "General/Negative":
language.General.Negative = reader.Value;
break;

View File

@ -70,6 +70,7 @@ namespace Nikse.SubtitleEdit.Logic
public string OverlapPreviousLineX { get; set; }
public string OverlapX { get; set; }
public string OverlapNextX { get; set; }
public string OverlapStartAndEnd { get; set; }
public string Negative { get; set; }
public string RegularExpressionIsNotValid { get; set; }
public string CurrentSubtitle { get; set; }