Work on assa properties

This commit is contained in:
niksedk 2022-01-09 14:40:21 +01:00
parent fdd6236eb7
commit 0641a908e8
4 changed files with 10 additions and 17 deletions

View File

@ -62,6 +62,7 @@ namespace Nikse.SubtitleEdit.Forms.Assa
buttonRemoveAll.Text = LanguageSettings.Current.SubStationAlphaStyles.RemoveAll;
buttonTextColor.Text = LanguageSettings.Current.Settings.WaveformTextColor;
buttonReset.Text = LanguageSettings.Current.General.Reset;
buttonTakePosFromVideo.Text = l.TakePosFromVideo;
columnHeaderName.Text = LanguageSettings.Current.General.Text;
columnHeaderStart.Text = LanguageSettings.Current.General.StartTime;

View File

@ -248,6 +248,7 @@
//
// comboBoxWrapStyle
//
this.comboBoxWrapStyle.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBoxWrapStyle.FormattingEnabled = true;
this.comboBoxWrapStyle.Items.AddRange(new object[] {
"0: Smart wrapping, top line is wider",
@ -392,7 +393,6 @@
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Sub Station Alpha properties";
this.Shown += new System.EventHandler(this.SubStationAlphaProperties_Shown);
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.SubStationAlphaProperties_KeyDown);
this.groupBoxScript.ResumeLayout(false);
this.groupBoxScript.PerformLayout();

View File

@ -14,7 +14,6 @@ namespace Nikse.SubtitleEdit.Forms.Assa
private readonly Subtitle _subtitle;
private readonly string _videoFileName;
private readonly VideoInfo _currentVideoInfo;
private readonly int _height;
public AssaProperties(Subtitle subtitle, string videoFileName, VideoInfo currentVideoInfo, string subtitleFileName)
{
@ -26,7 +25,12 @@ namespace Nikse.SubtitleEdit.Forms.Assa
_currentVideoInfo = currentVideoInfo;
var l = LanguageSettings.Current.SubStationAlphaProperties;
_height = 500;
comboBoxWrapStyle.Items.Clear();
comboBoxWrapStyle.Items.Add(l.WrapStyle0);
comboBoxWrapStyle.Items.Add(l.WrapStyle1);
comboBoxWrapStyle.Items.Add(l.WrapStyle2);
comboBoxWrapStyle.Items.Add(l.WrapStyle3);
Text = l.Title;
comboBoxWrapStyle.SelectedIndex = 2;
@ -122,19 +126,12 @@ namespace Nikse.SubtitleEdit.Forms.Assa
comboBoxWrapStyle.Width = groupBoxOptions.Right - comboBoxWrapStyle.Left - 25;
checkBoxScaleBorderAndShadow.Left = labelWrapStyle.Right + 10;
comboBoxWrapStyle.Items.Clear();
comboBoxWrapStyle.Items.Add(l.WrapStyle0);
comboBoxWrapStyle.Items.Add(l.WrapStyle1);
comboBoxWrapStyle.Items.Add(l.WrapStyle2);
comboBoxWrapStyle.Items.Add(l.WrapStyle3);
buttonOK.Text = LanguageSettings.Current.General.Ok;
buttonCancel.Text = LanguageSettings.Current.General.Cancel;
UiUtil.FixLargeFonts(this, buttonCancel);
buttonGetResolutionFromCurrentVideo.Enabled = !string.IsNullOrEmpty(videoFileName);
Height = _height;
}
private void buttonCancel_Click(object sender, EventArgs e)
@ -272,10 +269,5 @@ namespace Nikse.SubtitleEdit.Forms.Assa
numericUpDownVideoWidth.Value = _currentVideoInfo.Width;
numericUpDownVideoHeight.Value = _currentVideoInfo.Height;
}
private void SubStationAlphaProperties_Shown(object sender, EventArgs e)
{
Height = _height;
}
}
}

View File

@ -2716,8 +2716,8 @@ Fortsæt?</RestoreDefaultSettingsMsg>
<Collision>Kollision</Collision>
<ScaleBorderAndShadow>Scaler kant og skygge</ScaleBorderAndShadow>
<WrapStyle0>0: Smart ombrydning, toplinjen er bredere</WrapStyle0>
<WrapStyle1>1: End-of-line ordombrydning, kun \N bryder</WrapStyle1>
<WrapStyle2>2: Ingen ordombrydning, både\n og \N bryder</WrapStyle2>
<WrapStyle1>1: End-of-line ombrydning, kun \N bryder</WrapStyle1>
<WrapStyle2>2: Ingen ombrydning, både\n og \N bryder</WrapStyle2>
<WrapStyle3>3: Smart ombrydning, bundlinjen er bredere</WrapStyle3>
</SubStationAlphaProperties>
<SubStationAlphaStyles>