diff options
author | Terry Jan Reedy <tjreedy@udel.edu> | 2016-05-29 05:40:30 (GMT) |
---|---|---|
committer | Terry Jan Reedy <tjreedy@udel.edu> | 2016-05-29 05:40:30 (GMT) |
commit | e8a175eaa067d0f434933d2f003260a6d739c2d1 (patch) | |
tree | 9b311516a170f241f118e280eccb673f3bbda78b /Lib/turtledemo | |
parent | 58dd7648dede087f1f3cbedd70cd095ba9f1a381 (diff) | |
download | cpython-e8a175eaa067d0f434933d2f003260a6d739c2d1.zip cpython-e8a175eaa067d0f434933d2f003260a6d739c2d1.tar.gz cpython-e8a175eaa067d0f434933d2f003260a6d739c2d1.tar.bz2 |
Issue #27117: Make ColorDelegator htest and turtledemo work with dark theme.
Factor out code for configuring text widget colors to a new function.
Diffstat (limited to 'Lib/turtledemo')
-rw-r--r-- | Lib/turtledemo/__main__.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/turtledemo/__main__.py b/Lib/turtledemo/__main__.py index 106d058..711d0ab 100644 --- a/Lib/turtledemo/__main__.py +++ b/Lib/turtledemo/__main__.py @@ -89,8 +89,8 @@ import sys import os from tkinter import * +from idlelib.ColorDelegator import ColorDelegator, color_config from idlelib.Percolator import Percolator -from idlelib.ColorDelegator import ColorDelegator from idlelib.textView import view_text from turtledemo import __doc__ as about_turtledemo @@ -124,6 +124,8 @@ help_entries = ( # (help_label, help_doc) ('About turtle module', turtle.__doc__), ) + + class DemoWindow(object): def __init__(self, filename=None): @@ -204,6 +206,7 @@ class DemoWindow(object): self.text_frame = text_frame = Frame(root) self.text = text = Text(text_frame, name='text', padx=5, wrap='none', width=45) + color_config(text) self.vbar = vbar = Scrollbar(text_frame, name='vbar') vbar['command'] = text.yview |