-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
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
bpo-30870: IDLE: Change sample font when select by key-up/down #2617
Conversation
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.
I am about to submit a revision with the changes indicated, plus replacing list_fonts, a verb, with fontlist, a noun, plus a line to activate the current font, and a change to focus specifically on fontlist. Otherwise, keys do not work on windows until a font is clicked to focus and activate. Also will add NEWS file.
I plan to then work on tests. But not tonight. I hope to merge this tomorrow.
Lib/idlelib/configdialog.py
Outdated
'<ButtonRelease-1>', self.on_list_fonts_button_release) | ||
self.list_fonts.bind('<ButtonRelease-1>', self.on_list_fonts_button_release) | ||
self.list_fonts.bind('<KeyRelease-Up>', self.on_list_fonts_key_release) | ||
self.list_fonts.bind('<KeyRelease-Down>', self.on_list_fonts_key_release) |
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.
I replaced these with one binding to <>
Lib/idlelib/configdialog.py
Outdated
font = self.list_fonts.get(ACTIVE) | ||
self.font_name.set(font.lower()) | ||
self.set_font_sample() | ||
|
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.
I replaced both functions with one that used event.type to select the index.
Manual test passed. Effort to write unittest failed. Will add post to issue. |
…ythonGH-2617) Patch by Louie Lu. (cherry picked from commit bb2bae8)
No description provided.