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 5, 2023
1 parent cdf9de3 commit bf5201c
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Loading

0 comments on commit bf5201c

Please sign in to comment.