diff --git a/LanguageBaseEnglish.xml b/LanguageBaseEnglish.xml index fbda3d10b..03ece231c 100644 --- a/LanguageBaseEnglish.xml +++ b/LanguageBaseEnglish.xml @@ -96,6 +96,7 @@ Example: {0} Reset Warning + Use larger font for this window About Subtitle Edit diff --git a/src/libse/Common/Settings.cs b/src/libse/Common/Settings.cs index c9a88fed4..ff373bdad 100644 --- a/src/libse/Common/Settings.cs +++ b/src/libse/Common/Settings.cs @@ -124,6 +124,7 @@ namespace Nikse.SubtitleEdit.Core.Common public string MusicSymbolReplace { get; set; } public string UnicodeSymbolsToInsert { get; set; } public bool SpellCheckAutoChangeNameCasing { get; set; } + public bool SpellCheckUseLargerFont { get; set; } public bool SpellCheckAutoChangeNamesUseSuggestions { get; set; } public bool CheckOneLetterWords { get; set; } public bool SpellCheckEnglishAllowInQuoteAsIng { get; set; } @@ -4425,6 +4426,12 @@ $HorzAlign = Center settings.Tools.SpellCheckAutoChangeNameCasing = Convert.ToBoolean(subNode.InnerText, CultureInfo.InvariantCulture); } + subNode = node.SelectSingleNode("SpellCheckUseLargerFont"); + if (subNode != null) + { + settings.Tools.SpellCheckUseLargerFont = Convert.ToBoolean(subNode.InnerText, CultureInfo.InvariantCulture); + } + subNode = node.SelectSingleNode("SpellCheckAutoChangeNamesUseSuggestions"); if (subNode != null) { @@ -10059,6 +10066,7 @@ $HorzAlign = Center textWriter.WriteElementString("MusicSymbolReplace", settings.Tools.MusicSymbolReplace); textWriter.WriteElementString("UnicodeSymbolsToInsert", settings.Tools.UnicodeSymbolsToInsert); textWriter.WriteElementString("SpellCheckAutoChangeNameCasing", settings.Tools.SpellCheckAutoChangeNameCasing.ToString(CultureInfo.InvariantCulture)); + textWriter.WriteElementString("SpellCheckUseLargerFont", settings.Tools.SpellCheckUseLargerFont.ToString(CultureInfo.InvariantCulture)); textWriter.WriteElementString("SpellCheckAutoChangeNamesUseSuggestions", settings.Tools.SpellCheckAutoChangeNamesUseSuggestions.ToString(CultureInfo.InvariantCulture)); textWriter.WriteElementString("SpellCheckOneLetterWords", settings.Tools.CheckOneLetterWords.ToString(CultureInfo.InvariantCulture)); textWriter.WriteElementString("SpellCheckEnglishAllowInQuoteAsIng", settings.Tools.SpellCheckEnglishAllowInQuoteAsIng.ToString(CultureInfo.InvariantCulture)); diff --git a/src/ui/Forms/SpellCheck.Designer.cs b/src/ui/Forms/SpellCheck.Designer.cs index 7fc0a0de6..a162237b2 100644 --- a/src/ui/Forms/SpellCheck.Designer.cs +++ b/src/ui/Forms/SpellCheck.Designer.cs @@ -54,6 +54,10 @@ this.pictureBoxBookmark = new System.Windows.Forms.PictureBox(); this.panelBookmark = new System.Windows.Forms.Panel(); this.labelBookmark = new System.Windows.Forms.Label(); + this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); + this.useLargerFontForThisWindowToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.contextMenuStrip2 = new System.Windows.Forms.ContextMenuStrip(this.components); + this.useLargerFontForThisWindowToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.contextMenuStrip1.SuspendLayout(); this.groupBoxWordNotFound.SuspendLayout(); this.groupBoxSuggestions.SuspendLayout(); @@ -61,6 +65,7 @@ ((System.ComponentModel.ISupportInitialize)(this.pictureBoxBdSup)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBoxBookmark)).BeginInit(); this.panelBookmark.SuspendLayout(); + this.contextMenuStrip2.SuspendLayout(); this.SuspendLayout(); // // buttonAddToDictionary @@ -127,9 +132,11 @@ this.toolStripSeparator1, this.deleteToolStripMenuItem, this.bookmarkCommentToolStripMenuItem, - this.openImagedBasedSourceFileToolStripMenuItem}); + this.openImagedBasedSourceFileToolStripMenuItem, + this.toolStripSeparator2, + this.useLargerFontForThisWindowToolStripMenuItem}); this.contextMenuStrip1.Name = "contextMenuStrip1"; - this.contextMenuStrip1.Size = new System.Drawing.Size(247, 142); + this.contextMenuStrip1.Size = new System.Drawing.Size(247, 148); this.contextMenuStrip1.Opening += new System.ComponentModel.CancelEventHandler(this.ContextMenuStrip1Opening); // // addXToNamesnoiseListToolStripMenuItem @@ -461,6 +468,32 @@ this.labelBookmark.TabIndex = 0; this.labelBookmark.Text = "labelBookmark"; // + // toolStripSeparator2 + // + this.toolStripSeparator2.Name = "toolStripSeparator2"; + this.toolStripSeparator2.Size = new System.Drawing.Size(243, 6); + // + // useLargerFontForThisWindowToolStripMenuItem + // + this.useLargerFontForThisWindowToolStripMenuItem.Name = "useLargerFontForThisWindowToolStripMenuItem"; + this.useLargerFontForThisWindowToolStripMenuItem.Size = new System.Drawing.Size(246, 22); + this.useLargerFontForThisWindowToolStripMenuItem.Text = "Use larger font for this window"; + this.useLargerFontForThisWindowToolStripMenuItem.Click += new System.EventHandler(this.useLargerFontForThisWindowToolStripMenuItem_Click); + // + // contextMenuStrip2 + // + this.contextMenuStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.useLargerFontForThisWindowToolStripMenuItem1}); + this.contextMenuStrip2.Name = "contextMenuStrip2"; + this.contextMenuStrip2.Size = new System.Drawing.Size(237, 48); + // + // useLargerFontForThisWindowToolStripMenuItem1 + // + this.useLargerFontForThisWindowToolStripMenuItem1.Name = "useLargerFontForThisWindowToolStripMenuItem1"; + this.useLargerFontForThisWindowToolStripMenuItem1.Size = new System.Drawing.Size(236, 22); + this.useLargerFontForThisWindowToolStripMenuItem1.Text = "Use larger font for this window"; + this.useLargerFontForThisWindowToolStripMenuItem1.Click += new System.EventHandler(this.useLargerFontForThisWindowToolStripMenuItem_Click); + // // SpellCheck // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -490,6 +523,7 @@ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "Kom"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.SpellCheck_FormClosing); + this.Shown += new System.EventHandler(this.SpellCheck_Shown); this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.FormSpellCheck_KeyDown); this.contextMenuStrip1.ResumeLayout(false); this.groupBoxWordNotFound.ResumeLayout(false); @@ -502,6 +536,7 @@ ((System.ComponentModel.ISupportInitialize)(this.pictureBoxBookmark)).EndInit(); this.panelBookmark.ResumeLayout(false); this.panelBookmark.PerformLayout(); + this.contextMenuStrip2.ResumeLayout(false); this.ResumeLayout(false); this.PerformLayout(); @@ -547,5 +582,9 @@ private System.Windows.Forms.Panel panelBookmark; private System.Windows.Forms.Label labelBookmark; private System.Windows.Forms.ToolStripMenuItem bookmarkCommentToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator2; + private System.Windows.Forms.ToolStripMenuItem useLargerFontForThisWindowToolStripMenuItem; + private System.Windows.Forms.ContextMenuStrip contextMenuStrip2; + private System.Windows.Forms.ToolStripMenuItem useLargerFontForThisWindowToolStripMenuItem1; } } \ No newline at end of file diff --git a/src/ui/Forms/SpellCheck.cs b/src/ui/Forms/SpellCheck.cs index 4d4c1a529..a499e37d0 100644 --- a/src/ui/Forms/SpellCheck.cs +++ b/src/ui/Forms/SpellCheck.cs @@ -129,6 +129,8 @@ namespace Nikse.SubtitleEdit.Forms buttonAddToNames.Text = LanguageSettings.Current.SpellCheck.AddToNamesAndIgnoreList; buttonGoogleIt.Text = LanguageSettings.Current.Main.VideoControls.GoogleIt; deleteToolStripMenuItem.Text = LanguageSettings.Current.General.DeleteCurrentLine; + useLargerFontForThisWindowToolStripMenuItem.Text = LanguageSettings.Current.General.UseLargerFontForThisWindow; + useLargerFontForThisWindowToolStripMenuItem1.Text = LanguageSettings.Current.General.UseLargerFontForThisWindow; bookmarkCommentToolStripMenuItem.Text = LanguageSettings.Current.Settings.ToggleBookmarksWithComment; bookmarkCommentToolStripMenuItem.ShortcutKeys = UiUtil.GetKeys(Configuration.Settings.Shortcuts.GeneralToggleBookmarksWithText); @@ -1731,5 +1733,19 @@ namespace Nikse.SubtitleEdit.Forms pictureBoxBookmark.Hide(); } } + + private void useLargerFontForThisWindowToolStripMenuItem_Click(object sender, EventArgs e) + { + Font = useLargerFontForThisWindowToolStripMenuItem.Checked ? new Font(Font.FontFamily, Font.Size - 2, FontStyle.Regular) : new Font(Font.FontFamily, Font.Size + 2, FontStyle.Regular); + useLargerFontForThisWindowToolStripMenuItem.Checked = !useLargerFontForThisWindowToolStripMenuItem.Checked; + } + + private void SpellCheck_Shown(object sender, EventArgs e) + { + if (Configuration.Settings.Tools.SpellCheckUseLargerFont) + { + useLargerFontForThisWindowToolStripMenuItem_Click(null, null); + } + } } } diff --git a/src/ui/Forms/SpellCheck.resx b/src/ui/Forms/SpellCheck.resx index 15f75b3cd..298fdacbd 100644 --- a/src/ui/Forms/SpellCheck.resx +++ b/src/ui/Forms/SpellCheck.resx @@ -120,4 +120,7 @@ 17, 17 + + 172, 17 + \ No newline at end of file diff --git a/src/ui/Logic/Language.cs b/src/ui/Logic/Language.cs index 2e7bae6a6..5690b9eb8 100644 --- a/src/ui/Logic/Language.cs +++ b/src/ui/Logic/Language.cs @@ -226,6 +226,7 @@ namespace Nikse.SubtitleEdit.Logic ExampleX = "Example: {0}", Reset = "Reset", Warning = "Warning", + UseLargerFontForThisWindow = "Use larger font for this window", }; About = new LanguageStructure.About diff --git a/src/ui/Logic/LanguageDeserializer.cs b/src/ui/Logic/LanguageDeserializer.cs index 5c81a2355..6e111593c 100644 --- a/src/ui/Logic/LanguageDeserializer.cs +++ b/src/ui/Logic/LanguageDeserializer.cs @@ -343,6 +343,9 @@ namespace Nikse.SubtitleEdit.Logic case "General/Warning": language.General.Warning = reader.Value; break; + case "General/UseLargerFontForThisWindow": + language.General.UseLargerFontForThisWindow = reader.Value; + break; case "About/Title": language.About.Title = reader.Value; break; diff --git a/src/ui/Logic/LanguageStructure.cs b/src/ui/Logic/LanguageStructure.cs index 2944f61a6..1433bdf43 100644 --- a/src/ui/Logic/LanguageStructure.cs +++ b/src/ui/Logic/LanguageStructure.cs @@ -100,6 +100,7 @@ public string ExampleX { get; set; } public string Reset { get; set; } public string Warning { get; set; } + public string UseLargerFontForThisWindow { get; set; } } public class About