summaryrefslogtreecommitdiffstats
path: root/Lib/turtledemo
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2016-05-29 05:40:22 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2016-05-29 05:40:22 (GMT)
commit2bac3b778f0a3efe374334b9694e99ed48431414 (patch)
tree828b05f43f97108e3fa1b9435c1ee8e22d74d6ea /Lib/turtledemo
parent82069612ec2f1273c7061e099e70bb86bf66e97a (diff)
downloadcpython-2bac3b778f0a3efe374334b9694e99ed48431414.zip
cpython-2bac3b778f0a3efe374334b9694e99ed48431414.tar.gz
cpython-2bac3b778f0a3efe374334b9694e99ed48431414.tar.bz2
Issue #27117: Make colorizer 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__.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/turtledemo/__main__.py b/Lib/turtledemo/__main__.py
index 07a1c82..0a58332 100644
--- a/Lib/turtledemo/__main__.py
+++ b/Lib/turtledemo/__main__.py
@@ -89,8 +89,8 @@ import sys
import os
from tkinter import *
+from idlelib.colorizer import ColorDelegator, color_config
from idlelib.percolator import Percolator
-from idlelib.colorizer import ColorDelegator
from idlelib.textview import view_text
from turtledemo import __doc__ as about_turtledemo
@@ -123,6 +123,8 @@ help_entries = ( # (help_label, help_doc)
('About turtle module', turtle.__doc__),
)
+
+
class DemoWindow(object):
def __init__(self, filename=None):
@@ -203,6 +205,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