bpo-34548: IDLE: use configured theme colors in TextView#9008
Conversation
|
@taleinat Thanks for asking me to take a look at this PR. This is certainly an interesting change to consider, especially with issue33397 and Terry's idea to use that font resizing class for all windows. Since the TextView is currently used for help_about and the help button on config dialog, I'm lumping it in with the other Help screens (and the current change addressed in issue33397), but I also think Terry wanted to expand the use of TextView into other areas, which makes me think consistency across the app for fg and bg would also be a goal. When we notice something like this that should be changed, Terry usually opens a master bug tracker issue to make sure any related changes are also done. For example, this doesn't address the help.py window because it's not a TextView, but perhaps the overarching project would be to make all the colors and all the fonts consistent across the app. Also, I noticed that this My thought without having Terry's input is the A lot of the recent work on IDLE has been small changes (sometimes behind the scenes) to get the modules ready for a user-facing change. Based on that, even though your change is a good idea, I'm not sure if it should be step one or if colorizer needs some work first. Or if a new text_config module will be added that will handle both fg/bg color and resizing for text. |
Sorry, something went wrong.
|
As far as the project as it is now, I do think you should add tests for the colors. If this gets added to other modules for consistency, then the tests would be able to show that consistency, that is, before the change is made, the assert would fail and then after use |
Sorry, something went wrong.
|
In bpo-27117, I extracted the color_config code from |
Sorry, something went wrong.
terryjreedy
left a comment
There was a problem hiding this comment.
I cannot help but be pleased that the factoring_out of color_config make this TODO so trivial. Tal, thanks for noticing.
Cheryl, thank you for the review. bpo-33396 is the master issue for the help viewer. I just added item 9 about further upgrades to text viewer. I included consistency in using a proportional font for non-code text, at least for read-only text. (Help viewer already does this.)
Given that color_config has been tested in use, and that it works with the About IDLE files, including colorizing selections the same as in the editor, I approve of merging without other tests.
Sorry, something went wrong.
|
Thanks @taleinat for the PR 🌮🎉.. I'm working now to backport this PR to: 3.6, 3.7. |
Sorry, something went wrong.
https://bugs.python.org/issue34548 (cherry picked from commit c87d9f4) Co-authored-by: Tal Einat <taleinat+github@gmail.com>
https://bugs.python.org/issue34548 (cherry picked from commit c87d9f4) Co-authored-by: Tal Einat <taleinat+github@gmail.com>
|
I'm not backporting this to 2.7 since @terryjreedy's refactoring out of |
Sorry, something went wrong.
https://bugs.python.org/issue34548 (cherry picked from commit c87d9f4) Co-authored-by: Tal Einat <taleinat+github@gmail.com>
https://bugs.python.org/issue34548