Skip to content

Commit

Permalink
Add disable spell check option for custom styles
Browse files Browse the repository at this point in the history
  • Loading branch information
stevencohn authored and weissm committed Dec 1, 2023
1 parent c8b4602 commit 30023d9
Show file tree
Hide file tree
Showing 24 changed files with 501 additions and 394 deletions.
5 changes: 5 additions & 0 deletions OneMore/Commands/Styles/ApplyStyleCommand.cs
Expand Up @@ -243,6 +243,11 @@ private bool StylizeParagraphs()
ApplySpacing(element, "spaceAfter", style.SpaceAfter);
ApplySpacing(element, "spaceBetween", style.Spacing);

if (style.Ignored)
{
element.SetAttributeValue("lang", "yo");
}

ApplyToList(element, style);
}

Expand Down
47 changes: 31 additions & 16 deletions OneMore/Commands/Styles/StyleDialog.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions OneMore/Commands/Styles/StyleDialog.cs
Expand Up @@ -133,6 +133,7 @@ private void Initialize()
"defaultBlackToolStripMenuItem",
"transparentToolStripMenuItem",
// labels
"ignoredBox",
"beforeLabel",
"afterLabel",
"spacingLabel",
Expand Down Expand Up @@ -312,6 +313,7 @@ private void ShowSelection()
subButton.Checked = selection.IsSubscript;

applyColorsBox.Checked = selection.ApplyColors;
ignoredBox.Checked = selection.Ignored;

if (double.TryParse(selection.SpaceAfter, NumberStyles.Any, CultureInfo.InvariantCulture, out var sa))
{
Expand Down Expand Up @@ -673,6 +675,12 @@ private void ChangeApplyColorsOption(object sender, EventArgs e)
}


private void ChangeIgnored(object sender, EventArgs e)
{
selection.Ignored = ignoredBox.Checked;
}


private void ChangeSpaceAfter(object sender, EventArgs e)
{
selection.SpaceAfter = spaceAfterSpinner.Value.ToString("#0.0", CultureInfo.InvariantCulture);
Expand Down

0 comments on commit 30023d9

Please sign in to comment.