diff --git a/LanguageMaster.xml b/LanguageMaster.xml
index a8b7ca047..f9b3d16ce 100644
--- a/LanguageMaster.xml
+++ b/LanguageMaster.xml
@@ -2106,6 +2106,9 @@ can edit in same subtitle file (collaboration)
List view and text box
List view
Text box
+ Use syntax coloring
+ Html color
+ ASSA color
Update
Focus set video position
Toggle dock/undock of video controls
diff --git a/libse/Language.cs b/libse/Language.cs
index 7c48bb911..f5bb2b522 100644
--- a/libse/Language.cs
+++ b/libse/Language.cs
@@ -2411,6 +2411,9 @@ can edit in same subtitle file (collaboration)",
Key = "Key",
ListView = "List view",
TextBox = "Text box",
+ UseSyntaxColoring = "Use syntax coloring",
+ HtmlColor = "Html color",
+ AssaColor = "ASSA color",
ListViewAndTextBox = "List view and text box",
UpdateShortcut = "Update",
FoucsSetVideoPosition = "Focus set video position",
diff --git a/libse/LanguageDeserializer.cs b/libse/LanguageDeserializer.cs
index 987385988..18817a20d 100644
--- a/libse/LanguageDeserializer.cs
+++ b/libse/LanguageDeserializer.cs
@@ -5740,6 +5740,15 @@ namespace Nikse.SubtitleEdit.Core
case "Settings/TextBox":
language.Settings.TextBox = reader.Value;
break;
+ case "Settings/UseSyntaxColoring":
+ language.Settings.UseSyntaxColoring = reader.Value;
+ break;
+ case "Settings/HtmlColor":
+ language.Settings.HtmlColor = reader.Value;
+ break;
+ case "Settings/AssaColor":
+ language.Settings.AssaColor = reader.Value;
+ break;
case "Settings/UpdateShortcut":
language.Settings.UpdateShortcut = reader.Value;
break;
diff --git a/libse/LanguageStructure.cs b/libse/LanguageStructure.cs
index 4c17f4491..0b2874e6b 100644
--- a/libse/LanguageStructure.cs
+++ b/libse/LanguageStructure.cs
@@ -2272,6 +2272,9 @@
public string ListViewAndTextBox { get; set; }
public string ListView { get; set; }
public string TextBox { get; set; }
+ public string UseSyntaxColoring { get; set; }
+ public string HtmlColor { get; set; }
+ public string AssaColor { get; set; }
public string UpdateShortcut { get; set; }
public string FoucsSetVideoPosition { get; set; }
public string ToggleDockUndockOfVideoControls { get; set; }
diff --git a/src/Forms/Settings.Designer.cs b/src/Forms/Settings.Designer.cs
index 8e28ef8da..475355fe9 100644
--- a/src/Forms/Settings.Designer.cs
+++ b/src/Forms/Settings.Designer.cs
@@ -329,6 +329,11 @@
this.groupBoxFont = new System.Windows.Forms.GroupBox();
this.labelFontNote = new System.Windows.Forms.Label();
this.groupBoxFontTextBox = new System.Windows.Forms.GroupBox();
+ this.panelTextBoxAssColor = new System.Windows.Forms.Panel();
+ this.buttonTextBoxAssColor = new System.Windows.Forms.Button();
+ this.panelTextBoxHtmlColor = new System.Windows.Forms.Panel();
+ this.buttonTextBoxHtmlColor = new System.Windows.Forms.Button();
+ this.checkBoxSubtitleTextBoxSyntaxColor = new System.Windows.Forms.CheckBox();
this.labelSubtitleFontSize = new System.Windows.Forms.Label();
this.comboBoxSubtitleFontSize = new System.Windows.Forms.ComboBox();
this.checkBoxSubtitleFontBold = new System.Windows.Forms.CheckBox();
@@ -390,11 +395,6 @@
this.buttonReset = new System.Windows.Forms.Button();
this.toolTipContinuationPreview = new System.Windows.Forms.ToolTip(this.components);
this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
- this.checkBoxSubtitleTextBoxSyntaxColor = new System.Windows.Forms.CheckBox();
- this.panelTextBoxAssColor = new System.Windows.Forms.Panel();
- this.buttonTextBoxAssColor = new System.Windows.Forms.Button();
- this.panelTextBoxHtmlColor = new System.Windows.Forms.Panel();
- this.buttonTextBoxHtmlColor = new System.Windows.Forms.Button();
this.tabControlSettings.SuspendLayout();
this.tabPageGeneral.SuspendLayout();
this.groupBoxMiscellaneous.SuspendLayout();
@@ -4044,7 +4044,7 @@
// labelFontNote
//
this.labelFontNote.AutoSize = true;
- this.labelFontNote.Location = new System.Drawing.Point(11, 410);
+ this.labelFontNote.Location = new System.Drawing.Point(11, 352);
this.labelFontNote.Name = "labelFontNote";
this.labelFontNote.Size = new System.Drawing.Size(278, 13);
this.labelFontNote.TabIndex = 41;
@@ -4065,11 +4065,60 @@
this.groupBoxFontTextBox.Controls.Add(this.checkBoxSubtitleCenter);
this.groupBoxFontTextBox.Location = new System.Drawing.Point(14, 228);
this.groupBoxFontTextBox.Name = "groupBoxFontTextBox";
- this.groupBoxFontTextBox.Size = new System.Drawing.Size(806, 161);
+ this.groupBoxFontTextBox.Size = new System.Drawing.Size(806, 116);
this.groupBoxFontTextBox.TabIndex = 40;
this.groupBoxFontTextBox.TabStop = false;
this.groupBoxFontTextBox.Text = "Text box";
//
+ // panelTextBoxAssColor
+ //
+ this.panelTextBoxAssColor.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+ this.panelTextBoxAssColor.Location = new System.Drawing.Point(520, 73);
+ this.panelTextBoxAssColor.Name = "panelTextBoxAssColor";
+ this.panelTextBoxAssColor.Size = new System.Drawing.Size(21, 20);
+ this.panelTextBoxAssColor.TabIndex = 38;
+ this.panelTextBoxAssColor.MouseClick += new System.Windows.Forms.MouseEventHandler(this.panelTextBoxAssColor_MouseClick);
+ //
+ // buttonTextBoxAssColor
+ //
+ this.buttonTextBoxAssColor.Location = new System.Drawing.Point(396, 72);
+ this.buttonTextBoxAssColor.Name = "buttonTextBoxAssColor";
+ this.buttonTextBoxAssColor.Size = new System.Drawing.Size(112, 23);
+ this.buttonTextBoxAssColor.TabIndex = 36;
+ this.buttonTextBoxAssColor.Text = "ASSA color";
+ this.buttonTextBoxAssColor.UseVisualStyleBackColor = true;
+ this.buttonTextBoxAssColor.Click += new System.EventHandler(this.buttonTextBoxAssColor_Click);
+ //
+ // panelTextBoxHtmlColor
+ //
+ this.panelTextBoxHtmlColor.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+ this.panelTextBoxHtmlColor.Location = new System.Drawing.Point(520, 44);
+ this.panelTextBoxHtmlColor.Name = "panelTextBoxHtmlColor";
+ this.panelTextBoxHtmlColor.Size = new System.Drawing.Size(21, 20);
+ this.panelTextBoxHtmlColor.TabIndex = 37;
+ this.panelTextBoxHtmlColor.MouseClick += new System.Windows.Forms.MouseEventHandler(this.panelTextBoxHtmlColor_MouseClick);
+ //
+ // buttonTextBoxHtmlColor
+ //
+ this.buttonTextBoxHtmlColor.Location = new System.Drawing.Point(396, 43);
+ this.buttonTextBoxHtmlColor.Name = "buttonTextBoxHtmlColor";
+ this.buttonTextBoxHtmlColor.Size = new System.Drawing.Size(112, 23);
+ this.buttonTextBoxHtmlColor.TabIndex = 35;
+ this.buttonTextBoxHtmlColor.Text = "Html color";
+ this.buttonTextBoxHtmlColor.UseVisualStyleBackColor = true;
+ this.buttonTextBoxHtmlColor.Click += new System.EventHandler(this.buttonTextBoxHtmlColor_Click);
+ //
+ // checkBoxSubtitleTextBoxSyntaxColor
+ //
+ this.checkBoxSubtitleTextBoxSyntaxColor.AutoSize = true;
+ this.checkBoxSubtitleTextBoxSyntaxColor.Location = new System.Drawing.Point(396, 20);
+ this.checkBoxSubtitleTextBoxSyntaxColor.Name = "checkBoxSubtitleTextBoxSyntaxColor";
+ this.checkBoxSubtitleTextBoxSyntaxColor.Size = new System.Drawing.Size(120, 17);
+ this.checkBoxSubtitleTextBoxSyntaxColor.TabIndex = 34;
+ this.checkBoxSubtitleTextBoxSyntaxColor.Text = "Use syntax coloring";
+ this.checkBoxSubtitleTextBoxSyntaxColor.UseVisualStyleBackColor = true;
+ this.checkBoxSubtitleTextBoxSyntaxColor.CheckedChanged += new System.EventHandler(this.checkBoxSubtitleTextBoxSyntaxColor_CheckedChanged);
+ //
// labelSubtitleFontSize
//
this.labelSubtitleFontSize.AutoSize = true;
@@ -4724,50 +4773,6 @@
this.toolTipContinuationPreview.InitialDelay = 500;
this.toolTipContinuationPreview.ReshowDelay = 100;
//
- // checkBoxSubtitleTextBoxSyntaxColor
- //
- this.checkBoxSubtitleTextBoxSyntaxColor.AutoSize = true;
- this.checkBoxSubtitleTextBoxSyntaxColor.Location = new System.Drawing.Point(396, 20);
- this.checkBoxSubtitleTextBoxSyntaxColor.Name = "checkBoxSubtitleTextBoxSyntaxColor";
- this.checkBoxSubtitleTextBoxSyntaxColor.Size = new System.Drawing.Size(120, 17);
- this.checkBoxSubtitleTextBoxSyntaxColor.TabIndex = 34;
- this.checkBoxSubtitleTextBoxSyntaxColor.Text = "Use syntax coloring";
- this.checkBoxSubtitleTextBoxSyntaxColor.UseVisualStyleBackColor = true;
- //
- // panelTextBoxAssColor
- //
- this.panelTextBoxAssColor.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
- this.panelTextBoxAssColor.Location = new System.Drawing.Point(520, 73);
- this.panelTextBoxAssColor.Name = "panelTextBoxAssColor";
- this.panelTextBoxAssColor.Size = new System.Drawing.Size(21, 20);
- this.panelTextBoxAssColor.TabIndex = 38;
- //
- // buttonTextBoxAssColor
- //
- this.buttonTextBoxAssColor.Location = new System.Drawing.Point(396, 72);
- this.buttonTextBoxAssColor.Name = "buttonTextBoxAssColor";
- this.buttonTextBoxAssColor.Size = new System.Drawing.Size(112, 23);
- this.buttonTextBoxAssColor.TabIndex = 36;
- this.buttonTextBoxAssColor.Text = "ASSA color";
- this.buttonTextBoxAssColor.UseVisualStyleBackColor = true;
- //
- // panelTextBoxHtmlColor
- //
- this.panelTextBoxHtmlColor.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
- this.panelTextBoxHtmlColor.Location = new System.Drawing.Point(520, 44);
- this.panelTextBoxHtmlColor.Name = "panelTextBoxHtmlColor";
- this.panelTextBoxHtmlColor.Size = new System.Drawing.Size(21, 20);
- this.panelTextBoxHtmlColor.TabIndex = 37;
- //
- // buttonTextBoxHtmlColor
- //
- this.buttonTextBoxHtmlColor.Location = new System.Drawing.Point(396, 43);
- this.buttonTextBoxHtmlColor.Name = "buttonTextBoxHtmlColor";
- this.buttonTextBoxHtmlColor.Size = new System.Drawing.Size(112, 23);
- this.buttonTextBoxHtmlColor.TabIndex = 35;
- this.buttonTextBoxHtmlColor.Text = "Html color";
- this.buttonTextBoxHtmlColor.UseVisualStyleBackColor = true;
- //
// Settings
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
diff --git a/src/Forms/Settings.cs b/src/Forms/Settings.cs
index 0882957de..769474ac4 100644
--- a/src/Forms/Settings.cs
+++ b/src/Forms/Settings.cs
@@ -1971,7 +1971,7 @@ namespace Nikse.SubtitleEdit.Forms
{
font = new Font(Font, FontStyle.Regular);
}
-
+
var measureBmp = TextDesigner.MakeTextBitmapAssa(
Configuration.Settings.General.PreviewAssaText,
0,
@@ -3448,5 +3448,41 @@ namespace Nikse.SubtitleEdit.Forms
_backgroundImageDark = !_backgroundImageDark;
GeneratePreviewReal();
}
+
+ private void buttonTextBoxHtmlColor_Click(object sender, EventArgs e)
+ {
+ colorDialogSSAStyle.Color = panelTextBoxHtmlColor.BackColor;
+ if (colorDialogSSAStyle.ShowDialog() == DialogResult.OK)
+ {
+ panelTextBoxHtmlColor.BackColor = colorDialogSSAStyle.Color;
+ }
+ }
+
+ private void buttonTextBoxAssColor_Click(object sender, EventArgs e)
+ {
+ colorDialogSSAStyle.Color = panelTextBoxAssColor.BackColor;
+ if (colorDialogSSAStyle.ShowDialog() == DialogResult.OK)
+ {
+ panelTextBoxAssColor.BackColor = colorDialogSSAStyle.Color;
+ }
+ }
+
+ private void checkBoxSubtitleTextBoxSyntaxColor_CheckedChanged(object sender, EventArgs e)
+ {
+ buttonTextBoxHtmlColor.Enabled = checkBoxSubtitleTextBoxSyntaxColor.Checked;
+ panelTextBoxHtmlColor.Enabled = checkBoxSubtitleTextBoxSyntaxColor.Checked;
+ buttonTextBoxAssColor.Enabled = checkBoxSubtitleTextBoxSyntaxColor.Checked;
+ panelTextBoxAssColor.Enabled = checkBoxSubtitleTextBoxSyntaxColor.Checked;
+ }
+
+ private void panelTextBoxHtmlColor_MouseClick(object sender, MouseEventArgs e)
+ {
+ buttonTextBoxHtmlColor_Click(null, null);
+ }
+
+ private void panelTextBoxAssColor_MouseClick(object sender, MouseEventArgs e)
+ {
+ buttonTextBoxAssColor_Click(null, null);
+ }
}
}