mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-23 03:33:18 +01:00
More work on #3633
This commit is contained in:
parent
f834881fc2
commit
cbce939d4a
@ -439,8 +439,8 @@ namespace Nikse.SubtitleEdit.Core.BluRaySup
|
||||
}
|
||||
|
||||
if (overridePosition != null &&
|
||||
overridePosition.Value.X >= 0 && overridePosition.Value.X < bm.Width &&
|
||||
overridePosition.Value.Y >= 0 && overridePosition.Value.Y < bm.Height)
|
||||
overridePosition.Value.X >= 0 && overridePosition.Value.X < pic.Width &&
|
||||
overridePosition.Value.Y >= 0 && overridePosition.Value.Y < pic.Height)
|
||||
{
|
||||
pic.WindowXOffset = overridePosition.Value.X;
|
||||
pic.WindowYOffset = overridePosition.Value.Y;
|
||||
|
@ -2913,6 +2913,36 @@ $HorzAlign = Center
|
||||
settings.Tools.BatchConvertExportCustomTextTemplate = subNode.InnerText;
|
||||
}
|
||||
|
||||
subNode = node.SelectSingleNode("BatchConvertTsOverridePosition");
|
||||
if (subNode != null)
|
||||
{
|
||||
settings.Tools.BatchConvertTsOverridePosition = Convert.ToBoolean(subNode.InnerText, CultureInfo.InvariantCulture);
|
||||
}
|
||||
|
||||
subNode = node.SelectSingleNode("BatchConvertTsOverrideBottomMargin");
|
||||
if (subNode != null)
|
||||
{
|
||||
settings.Tools.BatchConvertTsOverrideBottomMargin = Convert.ToInt32(subNode.InnerText, CultureInfo.InvariantCulture);
|
||||
}
|
||||
|
||||
subNode = node.SelectSingleNode("BatchConvertTsOverrideScreenSize");
|
||||
if (subNode != null)
|
||||
{
|
||||
settings.Tools.BatchConvertTsOverrideScreenSize = Convert.ToBoolean(subNode.InnerText, CultureInfo.InvariantCulture);
|
||||
}
|
||||
|
||||
subNode = node.SelectSingleNode("BatchConvertTsScreenWidth");
|
||||
if (subNode != null)
|
||||
{
|
||||
settings.Tools.BatchConvertTsScreenWidth = Convert.ToInt32(subNode.InnerText, CultureInfo.InvariantCulture);
|
||||
}
|
||||
|
||||
subNode = node.SelectSingleNode("BatchConvertTsScreenHeight");
|
||||
if (subNode != null)
|
||||
{
|
||||
settings.Tools.BatchConvertTsScreenHeight = Convert.ToInt32(subNode.InnerText, CultureInfo.InvariantCulture);
|
||||
}
|
||||
|
||||
subNode = node.SelectSingleNode("ModifySelectionRule");
|
||||
if (subNode != null)
|
||||
{
|
||||
@ -6066,6 +6096,11 @@ $HorzAlign = Center
|
||||
textWriter.WriteElementString("BatchConvertSsaStyles", settings.Tools.BatchConvertSsaStyles);
|
||||
textWriter.WriteElementString("BatchConvertUseStyleFromSource", settings.Tools.BatchConvertUseStyleFromSource.ToString());
|
||||
textWriter.WriteElementString("BatchConvertExportCustomTextTemplate", settings.Tools.BatchConvertExportCustomTextTemplate);
|
||||
textWriter.WriteElementString("BatchConvertTsOverridePosition", settings.Tools.BatchConvertTsOverridePosition.ToString(CultureInfo.InvariantCulture));
|
||||
textWriter.WriteElementString("BatchConvertTsOverrideBottomMargin", settings.Tools.BatchConvertTsOverrideBottomMargin.ToString(CultureInfo.InvariantCulture));
|
||||
textWriter.WriteElementString("BatchConvertTsOverrideScreenSize", settings.Tools.BatchConvertTsOverrideScreenSize.ToString(CultureInfo.InvariantCulture));
|
||||
textWriter.WriteElementString("BatchConvertTsScreenWidth", settings.Tools.BatchConvertTsScreenWidth.ToString(CultureInfo.InvariantCulture));
|
||||
textWriter.WriteElementString("BatchConvertTsScreenHeight", settings.Tools.BatchConvertTsScreenHeight.ToString(CultureInfo.InvariantCulture));
|
||||
textWriter.WriteElementString("ModifySelectionRule", settings.Tools.ModifySelectionRule);
|
||||
textWriter.WriteElementString("ModifySelectionText", settings.Tools.ModifySelectionText);
|
||||
textWriter.WriteElementString("ModifySelectionCaseSensitive", settings.Tools.ModifySelectionCaseSensitive.ToString());
|
||||
|
@ -49,13 +49,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
numericUpDownWidth.Enabled = checkBoxOverrideVideoSize.Checked;
|
||||
labelHeight.Enabled = checkBoxOverrideVideoSize.Checked;
|
||||
numericUpDownHeight.Enabled = checkBoxOverrideVideoSize.Checked;
|
||||
|
||||
if (checkBoxOverrideVideoSize.Checked && !checkBoxOverrideOriginalPosition.Checked)
|
||||
{
|
||||
checkBoxOverrideOriginalPosition.Checked = true;
|
||||
}
|
||||
checkBoxOverrideOriginalPosition.Enabled = !checkBoxOverrideVideoSize.Checked;
|
||||
CheckBoxOverrideOriginalPosition_CheckedChanged(null, null);
|
||||
}
|
||||
|
||||
private void BatchConvertTsSettings_KeyDown(object sender, KeyEventArgs e)
|
||||
|
@ -91,10 +91,7 @@ namespace Nikse.SubtitleEdit.Logic.CommandLineConvert
|
||||
mp.ScreenWidth = width;
|
||||
mp.ScreenHeight = height;
|
||||
int bottomMarginInPixels;
|
||||
if (Configuration.Settings.Tools.BatchConvertTsOverridePosition ||
|
||||
Configuration.Settings.Tools.BatchConvertTsOverrideScreenSize &&
|
||||
Configuration.Settings.Tools.BatchConvertTsScreenWidth > 0 &&
|
||||
Configuration.Settings.Tools.BatchConvertTsScreenHeight > 0)
|
||||
if (Configuration.Settings.Tools.BatchConvertTsOverridePosition)
|
||||
{
|
||||
mp.BottomMargin = Configuration.Settings.Tools.BatchConvertTsOverrideBottomMargin;
|
||||
bottomMarginInPixels = Configuration.Settings.Tools.BatchConvertTsOverrideBottomMargin;
|
||||
|
@ -85,10 +85,7 @@ namespace Nikse.SubtitleEdit.Logic.CommandLineConvert
|
||||
mp.P = new Paragraph(string.Empty, p.StartMilliseconds, p.EndMilliseconds);
|
||||
mp.ScreenWidth = width;
|
||||
mp.ScreenHeight = height;
|
||||
if (Configuration.Settings.Tools.BatchConvertTsOverridePosition ||
|
||||
Configuration.Settings.Tools.BatchConvertTsOverrideScreenSize &&
|
||||
Configuration.Settings.Tools.BatchConvertTsScreenWidth > 0 &&
|
||||
Configuration.Settings.Tools.BatchConvertTsScreenHeight > 0)
|
||||
if (Configuration.Settings.Tools.BatchConvertTsOverridePosition)
|
||||
{
|
||||
mp.BottomMargin = Configuration.Settings.Tools.BatchConvertTsOverrideBottomMargin;
|
||||
mp.Alignment = ContentAlignment.BottomCenter;
|
||||
|
Loading…
Reference in New Issue
Block a user