aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/idlelib/configdialog.py
diff options
context:
space:
mode:
authorCheryl Sabella <cheryl.sabella@gmail.com>2018-06-01 21:45:54 -0400
committerTerry Jan Reedy <tjreedy@udel.edu>2018-06-01 21:45:54 -0400
commitde6516264e793be991f692fdd892707afb9104a7 (patch)
tree8323fe9858ead378731de9edd748fd874f125559 /Lib/idlelib/configdialog.py
parent63799136e6c0491bb5d6f4a234d5a775db3458db (diff)
downloadcpython-de6516264e793be991f692fdd892707afb9104a7.tar.gz
cpython-de6516264e793be991f692fdd892707afb9104a7.zip
bpo-33679: IDLE: Re-enable color configuration for code context (GH-7199)
The difference from before is that the settings are now on the Highlights tab instead of the Extensions tab and only change one theme at a time instead of all themes. The default for light themes is black on light gray, as before. The default for the IDLE Dark theme is white on dark gray, which better fits the dark theme. When one starts IDLE from a console and loads a custom theme without definitions for 'context', one will see a warning message on the console. To stop the warning, go to Options => Configure IDLE => Highlights, select the custom theme if not selected already, select 'Code Context', and select foreground and background colors.
Diffstat (limited to 'Lib/idlelib/configdialog.py')
-rw-r--r--Lib/idlelib/configdialog.py28
1 files changed, 15 insertions, 13 deletions
diff --git a/Lib/idlelib/configdialog.py b/Lib/idlelib/configdialog.py
index 28ad4586394..7df69d5c4d6 100644
--- a/Lib/idlelib/configdialog.py
+++ b/Lib/idlelib/configdialog.py
@@ -799,19 +799,20 @@ class HighPage(Frame):
"""
self.theme_elements = {
'Normal Text': ('normal', '00'),
- 'Python Keywords': ('keyword', '01'),
- 'Python Definitions': ('definition', '02'),
- 'Python Builtins': ('builtin', '03'),
- 'Python Comments': ('comment', '04'),
- 'Python Strings': ('string', '05'),
- 'Selected Text': ('hilite', '06'),
- 'Found Text': ('hit', '07'),
- 'Cursor': ('cursor', '08'),
- 'Editor Breakpoint': ('break', '09'),
- 'Shell Normal Text': ('console', '10'),
- 'Shell Error Text': ('error', '11'),
- 'Shell Stdout Text': ('stdout', '12'),
- 'Shell Stderr Text': ('stderr', '13'),
+ 'Code Context': ('context', '01'),
+ 'Python Keywords': ('keyword', '02'),
+ 'Python Definitions': ('definition', '03'),
+ 'Python Builtins': ('builtin', '04'),
+ 'Python Comments': ('comment', '05'),
+ 'Python Strings': ('string', '06'),
+ 'Selected Text': ('hilite', '07'),
+ 'Found Text': ('hit', '08'),
+ 'Cursor': ('cursor', '09'),
+ 'Editor Breakpoint': ('break', '10'),
+ 'Shell Normal Text': ('console', '11'),
+ 'Shell Error Text': ('error', '12'),
+ 'Shell Stdout Text': ('stdout', '13'),
+ 'Shell Stderr Text': ('stderr', '14'),
}
self.builtin_name = tracers.add(
StringVar(self), self.var_changed_builtin_name)
@@ -842,6 +843,7 @@ class HighPage(Frame):
('\n', 'normal'),
('#you can click here', 'comment'), ('\n', 'normal'),
('#to choose items', 'comment'), ('\n', 'normal'),
+ ('code context section', 'context'), ('\n\n', 'normal'),
('def', 'keyword'), (' ', 'normal'),
('func', 'definition'), ('(param):\n ', 'normal'),
('"""string"""', 'string'), ('\n var0 = ', 'normal'),