summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2015-10-04 04:31:05 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2015-10-04 04:31:05 (GMT)
commitbe5b7a24371008d6ddc811e90e33e9c1895f9681 (patch)
tree56aa6a7d38d6b155de58181ed2b2f1c491693470 /Lib
parent841d9ee41a8ad0a8a372f9b84f0fa40b07bcc66b (diff)
downloadcpython-be5b7a24371008d6ddc811e90e33e9c1895f9681.zip
cpython-be5b7a24371008d6ddc811e90e33e9c1895f9681.tar.gz
cpython-be5b7a24371008d6ddc811e90e33e9c1895f9681.tar.bz2
Issue #24820: Add 'IDLE Dark' text color theme, warning, and solution.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/idlelib/config-highlight.def29
-rw-r--r--Lib/idlelib/configDialog.py14
2 files changed, 43 insertions, 0 deletions
diff --git a/Lib/idlelib/config-highlight.def b/Lib/idlelib/config-highlight.def
index 7d20f78..4146e28 100644
--- a/Lib/idlelib/config-highlight.def
+++ b/Lib/idlelib/config-highlight.def
@@ -62,3 +62,32 @@ stderr-foreground= red
stderr-background= #ffffff
console-foreground= #770000
console-background= #ffffff
+
+[IDLE Dark]
+comment-foreground = #dd0000
+console-foreground = #ff4d4d
+error-foreground = #FFFFFF
+hilite-background = #7e7e7e
+string-foreground = #02ff02
+stderr-background = #002240
+stderr-foreground = #ffb3b3
+console-background = #002240
+hit-background = #fbfbfb
+string-background = #002240
+normal-background = #002240
+hilite-foreground = #FFFFFF
+keyword-foreground = #ff8000
+error-background = #c86464
+keyword-background = #002240
+builtin-background = #002240
+break-background = #808000
+builtin-foreground = #ff00ff
+definition-foreground = #5e5eff
+stdout-foreground = #c2d1fa
+definition-background = #002240
+normal-foreground = #FFFFFF
+cursor-foreground = #ffffff
+stdout-background = #002240
+hit-foreground = #002240
+comment-background = #002240
+break-foreground = #FFFFFF
diff --git a/Lib/idlelib/configDialog.py b/Lib/idlelib/configDialog.py
index b987293..94a9fb8 100644
--- a/Lib/idlelib/configDialog.py
+++ b/Lib/idlelib/configDialog.py
@@ -507,6 +507,20 @@ class ConfigDialog(Toplevel):
def VarChanged_builtinTheme(self, *params):
value = self.builtinTheme.get()
+ if value == 'IDLE Dark':
+ tkMessageBox.showwarning(
+ title="The 'IDLE Dark' Text Color Theme",
+ message="IDLE Dark is new in October, 2015. Trying to "
+ "run earlier versions of IDLE with it selected "
+ "will disable colorizing, or worse.\n\n"
+ "If you might ever run an earlier release of IDLE, "
+ "then before exiting this version, "
+ "either switch to another theme or "
+ "hit the 'Save as New Custom Theme' button. "
+ "The latter requires a new name, such as "
+ "'Custom Dark', but the custom theme will work "
+ "with any IDLE release, and can be modified.",
+ parent=self)
self.AddChangedItem('main', 'Theme', 'name', value)
self.PaintThemeSample()