added video preview font size

git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@375 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
niksedk 2011-03-28 06:05:01 +00:00
parent 506dd10c62
commit e986fa6602
8 changed files with 75 additions and 18 deletions

View File

@ -3,7 +3,6 @@ using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Nikse.SubtitleEdit.Logic.VideoPlayers;
using Nikse.SubtitleEdit.Logic;
namespace Nikse.SubtitleEdit.Controls
{
@ -173,7 +172,7 @@ namespace Nikse.SubtitleEdit.Controls
var gs = Nikse.SubtitleEdit.Logic.Configuration.Settings.General;
if (string.IsNullOrEmpty(gs.SubtitleFontName))
gs.SubtitleFontName = "Tahoma";
_subtitleTextBox.Font = new Font(gs.SubtitleFontName, gs.SubtitleFontSize+1.5F, FontStyle.Bold);
_subtitleTextBox.Font = new Font(gs.SubtitleFontName, gs.VideoPlayerPreviewFontSize, FontStyle.Bold);
}
void SubtitleTextBox_MouseClick(object sender, MouseEventArgs e)

View File

@ -1719,6 +1719,7 @@ namespace Nikse.SubtitleEdit.Forms
mediaPlayer.SetSubtitleFont();
Utilities.ShowSubtitle(_subtitle.Paragraphs, mediaPlayer);
}
mediaPlayer.SetSubtitleFont();
if (oldListViewLineSeparatorString != Configuration.Settings.General.ListViewLineSeparatorString)
{

View File

@ -684,7 +684,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAD2
CAAAAk1TRnQBSQFMAgEBAgEAAQgBBAEIAQQBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
CAAAAk1TRnQBSQFMAgEBAgEAARgBBAEYAQQBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA

View File

@ -108,6 +108,8 @@
this.labelCustomSearch = new System.Windows.Forms.Label();
this.comboBoxCustomSearch = new System.Windows.Forms.ComboBox();
this.groupBoxVideoPlayerDefault = new System.Windows.Forms.GroupBox();
this.labelVideoPlayerPreviewFontSize = new System.Windows.Forms.Label();
this.comboBoxlVideoPlayerPreviewFontSize = new System.Windows.Forms.ComboBox();
this.checkBoxVideoPlayerShowStopButton = new System.Windows.Forms.CheckBox();
this.comboBoxVideoPlayerDefaultVolume = new System.Windows.Forms.ComboBox();
this.labelDefaultVol = new System.Windows.Forms.Label();
@ -141,6 +143,7 @@
this.groupBoxSpellCheck = new System.Windows.Forms.GroupBox();
this.checkBoxSpellCheckAutoChangeNames = new System.Windows.Forms.CheckBox();
this.groupBoxFixCommonErrors = new System.Windows.Forms.GroupBox();
this.checkBoxFixCommonOcrErrorsUsingHardcodedRules = new System.Windows.Forms.CheckBox();
this.comboBoxToolsMusicSymbol = new System.Windows.Forms.ComboBox();
this.textBoxMusicSymbolsToReplace = new System.Windows.Forms.TextBox();
this.labelToolsMusicSymbolsToReplace = new System.Windows.Forms.Label();
@ -196,7 +199,6 @@
this.colorDialogSSAStyle = new System.Windows.Forms.ColorDialog();
this.fontDialogSSAStyle = new System.Windows.Forms.FontDialog();
this.labelStatus = new System.Windows.Forms.Label();
this.checkBoxFixCommonOcrErrorsUsingHardcodedRules = new System.Windows.Forms.CheckBox();
this.tabControlSettings.SuspendLayout();
this.tabPageGenerel.SuspendLayout();
this.groupBoxMiscellaneous.SuspendLayout();
@ -1045,9 +1047,9 @@
this.groupBoxMainWindowVideoControls.Controls.Add(this.textBoxCustomSearchUrl);
this.groupBoxMainWindowVideoControls.Controls.Add(this.labelCustomSearch);
this.groupBoxMainWindowVideoControls.Controls.Add(this.comboBoxCustomSearch);
this.groupBoxMainWindowVideoControls.Location = new System.Drawing.Point(7, 241);
this.groupBoxMainWindowVideoControls.Location = new System.Drawing.Point(7, 296);
this.groupBoxMainWindowVideoControls.Name = "groupBoxMainWindowVideoControls";
this.groupBoxMainWindowVideoControls.Size = new System.Drawing.Size(785, 164);
this.groupBoxMainWindowVideoControls.Size = new System.Drawing.Size(785, 109);
this.groupBoxMainWindowVideoControls.TabIndex = 15;
this.groupBoxMainWindowVideoControls.TabStop = false;
this.groupBoxMainWindowVideoControls.Text = "Main window video controls";
@ -1084,16 +1086,50 @@
//
// groupBoxVideoPlayerDefault
//
this.groupBoxVideoPlayerDefault.Controls.Add(this.labelVideoPlayerPreviewFontSize);
this.groupBoxVideoPlayerDefault.Controls.Add(this.comboBoxlVideoPlayerPreviewFontSize);
this.groupBoxVideoPlayerDefault.Controls.Add(this.checkBoxVideoPlayerShowStopButton);
this.groupBoxVideoPlayerDefault.Controls.Add(this.comboBoxVideoPlayerDefaultVolume);
this.groupBoxVideoPlayerDefault.Controls.Add(this.labelDefaultVol);
this.groupBoxVideoPlayerDefault.Controls.Add(this.labelVolDescr);
this.groupBoxVideoPlayerDefault.Location = new System.Drawing.Point(7, 135);
this.groupBoxVideoPlayerDefault.Name = "groupBoxVideoPlayerDefault";
this.groupBoxVideoPlayerDefault.Size = new System.Drawing.Size(785, 99);
this.groupBoxVideoPlayerDefault.Size = new System.Drawing.Size(785, 155);
this.groupBoxVideoPlayerDefault.TabIndex = 14;
this.groupBoxVideoPlayerDefault.TabStop = false;
//
// labelVideoPlayerPreviewFontSize
//
this.labelVideoPlayerPreviewFontSize.AutoSize = true;
this.labelVideoPlayerPreviewFontSize.Location = new System.Drawing.Point(11, 103);
this.labelVideoPlayerPreviewFontSize.Name = "labelVideoPlayerPreviewFontSize";
this.labelVideoPlayerPreviewFontSize.Size = new System.Drawing.Size(128, 13);
this.labelVideoPlayerPreviewFontSize.TabIndex = 14;
this.labelVideoPlayerPreviewFontSize.Text = "Subtitle preview font size";
//
// comboBoxlVideoPlayerPreviewFontSize
//
this.comboBoxlVideoPlayerPreviewFontSize.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBoxlVideoPlayerPreviewFontSize.FormattingEnabled = true;
this.comboBoxlVideoPlayerPreviewFontSize.Items.AddRange(new object[] {
"8",
"9",
"10",
"11",
"12",
"13",
"14",
"15",
"16",
"17",
"18",
"19",
"20"});
this.comboBoxlVideoPlayerPreviewFontSize.Location = new System.Drawing.Point(145, 100);
this.comboBoxlVideoPlayerPreviewFontSize.Name = "comboBoxlVideoPlayerPreviewFontSize";
this.comboBoxlVideoPlayerPreviewFontSize.Size = new System.Drawing.Size(121, 21);
this.comboBoxlVideoPlayerPreviewFontSize.TabIndex = 13;
//
// checkBoxVideoPlayerShowStopButton
//
this.checkBoxVideoPlayerShowStopButton.AutoSize = true;
@ -1433,7 +1469,7 @@
this.checkBoxSpellCheckAutoChangeNames.AutoSize = true;
this.checkBoxSpellCheckAutoChangeNames.Location = new System.Drawing.Point(15, 20);
this.checkBoxSpellCheckAutoChangeNames.Name = "checkBoxSpellCheckAutoChangeNames";
this.checkBoxSpellCheckAutoChangeNames.Size = new System.Drawing.Size(216, 17);
this.checkBoxSpellCheckAutoChangeNames.Size = new System.Drawing.Size(209, 17);
this.checkBoxSpellCheckAutoChangeNames.TabIndex = 0;
this.checkBoxSpellCheckAutoChangeNames.Text = "Auto fix names where only casing differ";
this.checkBoxSpellCheckAutoChangeNames.UseVisualStyleBackColor = true;
@ -1452,6 +1488,16 @@
this.groupBoxFixCommonErrors.TabStop = false;
this.groupBoxFixCommonErrors.Text = "Fix common errors";
//
// checkBoxFixCommonOcrErrorsUsingHardcodedRules
//
this.checkBoxFixCommonOcrErrorsUsingHardcodedRules.AutoSize = true;
this.checkBoxFixCommonOcrErrorsUsingHardcodedRules.Location = new System.Drawing.Point(15, 115);
this.checkBoxFixCommonOcrErrorsUsingHardcodedRules.Name = "checkBoxFixCommonOcrErrorsUsingHardcodedRules";
this.checkBoxFixCommonOcrErrorsUsingHardcodedRules.Size = new System.Drawing.Size(264, 17);
this.checkBoxFixCommonOcrErrorsUsingHardcodedRules.TabIndex = 2;
this.checkBoxFixCommonOcrErrorsUsingHardcodedRules.Text = "Fix common OCR errors - also use hardcoded rules";
this.checkBoxFixCommonOcrErrorsUsingHardcodedRules.UseVisualStyleBackColor = true;
//
// comboBoxToolsMusicSymbol
//
this.comboBoxToolsMusicSymbol.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
@ -2000,16 +2046,6 @@
this.labelStatus.TabIndex = 3;
this.labelStatus.Text = "labelStatus";
//
// checkBoxFixCommonOcrErrorsUsingHardcodedRules
//
this.checkBoxFixCommonOcrErrorsUsingHardcodedRules.AutoSize = true;
this.checkBoxFixCommonOcrErrorsUsingHardcodedRules.Location = new System.Drawing.Point(15, 115);
this.checkBoxFixCommonOcrErrorsUsingHardcodedRules.Name = "checkBoxFixCommonOcrErrorsUsingHardcodedRules";
this.checkBoxFixCommonOcrErrorsUsingHardcodedRules.Size = new System.Drawing.Size(268, 17);
this.checkBoxFixCommonOcrErrorsUsingHardcodedRules.TabIndex = 2;
this.checkBoxFixCommonOcrErrorsUsingHardcodedRules.Text = "Fix common OCR errors - also use hardcoded rules";
this.checkBoxFixCommonOcrErrorsUsingHardcodedRules.UseVisualStyleBackColor = true;
//
// Settings
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -2260,5 +2296,7 @@
private System.Windows.Forms.ComboBox comboBoxMergeShortLineLength;
private System.Windows.Forms.CheckBox checkBoxAutoWrapWhileTyping;
private System.Windows.Forms.CheckBox checkBoxFixCommonOcrErrorsUsingHardcodedRules;
private System.Windows.Forms.Label labelVideoPlayerPreviewFontSize;
private System.Windows.Forms.ComboBox comboBoxlVideoPlayerPreviewFontSize;
}
}

View File

@ -106,6 +106,12 @@ namespace Nikse.SubtitleEdit.Forms
comboBoxVideoPlayerDefaultVolume.SelectedIndex = gs.VideoPlayerDefaultVolume;
checkBoxVideoPlayerShowStopButton.Checked = gs.VideoPlayerShowStopButton;
int videoPlayerPreviewFontSizeIndex = gs.VideoPlayerPreviewFontSize - int.Parse(comboBoxlVideoPlayerPreviewFontSize.Items[0].ToString());
if (videoPlayerPreviewFontSizeIndex >= 0 && videoPlayerPreviewFontSizeIndex < comboBoxlVideoPlayerPreviewFontSize.Items.Count)
comboBoxlVideoPlayerPreviewFontSize.SelectedIndex = videoPlayerPreviewFontSizeIndex;
else
comboBoxlVideoPlayerPreviewFontSize.SelectedIndex = 3;
comboBoxCustomSearch.Text = Configuration.Settings.VideoControls.CustomSearchText;
textBoxCustomSearchUrl.Text = Configuration.Settings.VideoControls.CustomSearchUrl;
@ -219,6 +225,9 @@ namespace Nikse.SubtitleEdit.Forms
labelDefaultVol.Text = language.DefaultVolume;
labelVolDescr.Text = language.VolumeNotes;
labelVideoPlayerPreviewFontSize.Text = language.PreviewFontSize;
comboBoxlVideoPlayerPreviewFontSize.Left = labelVideoPlayerPreviewFontSize.Left + labelVideoPlayerPreviewFontSize.Width;
groupBoxMainWindowVideoControls.Text = language.MainWindowVideoControls;
labelCustomSearch.Text = language.CustomSearchTextAndUrl;
@ -591,6 +600,8 @@ namespace Nikse.SubtitleEdit.Forms
comboBoxVideoPlayerDefaultVolume.SelectedIndex = 50;
gs.VideoPlayerShowStopButton = checkBoxVideoPlayerShowStopButton.Checked;
gs.VideoPlayerPreviewFontSize = int.Parse(comboBoxlVideoPlayerPreviewFontSize.Items[0].ToString()) + comboBoxlVideoPlayerPreviewFontSize.SelectedIndex;
Configuration.Settings.VideoControls.CustomSearchText = comboBoxCustomSearch.Text;
Configuration.Settings.VideoControls.CustomSearchUrl = textBoxCustomSearchUrl.Text;

View File

@ -1106,6 +1106,7 @@ can edit in same subtitle file (collaboration)",
ShowStopButton = "Show stop button",
DefaultVolume = "Default volume",
VolumeNotes = "0 is no sound, 100 is highest volume",
PreviewFontSize = "Subtitle preview font size",
MainWindowVideoControls = "Main window video controls",
CustomSearchTextAndUrl = "Custom search text and url",
WaveFormAppearance = "Wave form appearance",

View File

@ -1040,6 +1040,7 @@
public string ShowStopButton { get; set; }
public string DefaultVolume { get; set; }
public string VolumeNotes { get; set; }
public string PreviewFontSize { get; set; }
public string MainWindowVideoControls { get; set; }
public string CustomSearchTextAndUrl { get; set; }
public string WaveFormAppearance { get; set; }

View File

@ -236,6 +236,7 @@ namespace Nikse.SubtitleEdit.Logic
public string SpellCheckLanguage { get; set; }
public string VideoPlayer { get; set; }
public int VideoPlayerDefaultVolume { get; set; }
public int VideoPlayerPreviewFontSize { get; set; }
public bool VideoPlayerShowStopButton { get; set; }
public string Language { get; set; }
public string ListViewLineSeparatorString { get; set; }
@ -287,6 +288,7 @@ namespace Nikse.SubtitleEdit.Logic
SpellCheckLanguage = null;
VideoPlayer = string.Empty;
VideoPlayerDefaultVolume = 50;
VideoPlayerPreviewFontSize = 10;
VideoPlayerShowStopButton = true;
ListViewLineSeparatorString = "<br />";
ListViewDoubleClickAction = 1;
@ -672,6 +674,9 @@ namespace Nikse.SubtitleEdit.Logic
subNode = node.SelectSingleNode("VideoPlayerDefaultVolume");
if (subNode != null)
settings.General.VideoPlayerDefaultVolume = Convert.ToInt32(subNode.InnerText);
subNode = node.SelectSingleNode("VideoPlayerPreviewFontSize");
if (subNode != null)
settings.General.VideoPlayerPreviewFontSize = Convert.ToInt32(subNode.InnerText);
subNode = node.SelectSingleNode("VideoPlayerShowStopButton");
if (subNode != null)
settings.General.VideoPlayerShowStopButton = Convert.ToBoolean(subNode.InnerText);
@ -1071,6 +1076,7 @@ namespace Nikse.SubtitleEdit.Logic
textWriter.WriteElementString("SpellCheckLanguage", settings.General.SpellCheckLanguage);
textWriter.WriteElementString("VideoPlayer", settings.General.VideoPlayer);
textWriter.WriteElementString("VideoPlayerDefaultVolume", settings.General.VideoPlayerDefaultVolume.ToString());
textWriter.WriteElementString("VideoPlayerPreviewFontSize", settings.General.VideoPlayerPreviewFontSize.ToString());
textWriter.WriteElementString("VideoPlayerShowStopButton", settings.General.VideoPlayerShowStopButton.ToString());
textWriter.WriteElementString("Language", settings.General.Language);
textWriter.WriteElementString("ListViewLineSeparatorString", settings.General.ListViewLineSeparatorString);