-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spell check #355
Spell check #355
Conversation
Question for @srjfoo: If you run the spell checker in GG2, it lists the spelling errors, and chooses the first error (or the user can choose any error) which then selects that word in the main text window. If you decide you want to adjust the threshold and re-run, then now it only rechecks that one word (because it is selected and we have just made spell check only check the selection if there is one. Any good ideas of how to make it more helpful? My best idea so far (which would need to wait until #351 is merged, with its "restore selection" feature) - probably more accurate to describe the comments below as a brain dump / random thoughts: |
If user has selected text, spell check will just check the selected words (or part words if word is not wholly within selection).
If word appears more times in the file than the threshold value, it is assumed to be a good spelling and so is not reported - this is the same as GG1's behavior.
When spell check (or other tools) want to highlight a word in the main text window, use a new tag (spotlight) instead of the default system selection. This is more similar to the way GG1 works, and eliminates problems with having an unwanted selection that clashes with re-running tools like spell check.
@srjfoo - I've pushed another commit that uses the "alternative selection"/"highlighting" idea instead of the main selection mechanism when highlighting a word due to a click in a checker tool (also in WF). The color (orange) is the same as GG1. Question: Would it be better if the selected words in the dialog were also in orange? I tried it, and having lots of orange was a bit overwhelming, so I've currently left them in the default selection color. Here's a screen shot of all orange compared with leaving it blue. |
COLORS_SPOTLIGHT = { | ||
"Light": {"bg": "orange", "fg": "black"}, | ||
"Dark": {"bg": "orange", "fg": "white"}, | ||
"Default": {"bg": "orange", "fg": "black"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aaah, this is why I see black text on orange in the main text window. :D
Black looks fine on orange, which is a good reason to choose a color that black and white are equally readable on, because otherwise, fancy footwork would be needed with the default theme.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See additional color notes in #353 relating to "fancy footwork" for default theme.
I've added #364 to tackle this |
If user has selected text, spell check will just check the selected words (or part words if word is not wholly within selection). Note that GG1 Spell Query does not have this feature, but Spell Check does.
If word appears more times in the file than the threshold value, it is assumed to be a good spelling and so is not reported - this is the same as GG1's Spell Query but Spell Check does not have this.
.