Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit be5b7a2

Browse files
committed
Issue #24820: Add 'IDLE Dark' text color theme, warning, and solution.
1 parent 841d9ee commit be5b7a2

2 files changed

Lines changed: 43 additions & 0 deletions

File tree

Lib/idlelib/config-highlight.def

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,32 @@ stderr-foreground= red
6262
stderr-background= #ffffff
6363
console-foreground= #770000
6464
console-background= #ffffff
65+
66+
[IDLE Dark]
67+
comment-foreground = #dd0000
68+
console-foreground = #ff4d4d
69+
error-foreground = #FFFFFF
70+
hilite-background = #7e7e7e
71+
string-foreground = #02ff02
72+
stderr-background = #002240
73+
stderr-foreground = #ffb3b3
74+
console-background = #002240
75+
hit-background = #fbfbfb
76+
string-background = #002240
77+
normal-background = #002240
78+
hilite-foreground = #FFFFFF
79+
keyword-foreground = #ff8000
80+
error-background = #c86464
81+
keyword-background = #002240
82+
builtin-background = #002240
83+
break-background = #808000
84+
builtin-foreground = #ff00ff
85+
definition-foreground = #5e5eff
86+
stdout-foreground = #c2d1fa
87+
definition-background = #002240
88+
normal-foreground = #FFFFFF
89+
cursor-foreground = #ffffff
90+
stdout-background = #002240
91+
hit-foreground = #002240
92+
comment-background = #002240
93+
break-foreground = #FFFFFF

Lib/idlelib/configDialog.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,20 @@ def VarChanged_colour(self, *params):
507507

508508
def VarChanged_builtinTheme(self, *params):
509509
value = self.builtinTheme.get()
510+
if value == 'IDLE Dark':
511+
tkMessageBox.showwarning(
512+
title="The 'IDLE Dark' Text Color Theme",
513+
message="IDLE Dark is new in October, 2015. Trying to "
514+
"run earlier versions of IDLE with it selected "
515+
"will disable colorizing, or worse.\n\n"
516+
"If you might ever run an earlier release of IDLE, "
517+
"then before exiting this version, "
518+
"either switch to another theme or "
519+
"hit the 'Save as New Custom Theme' button. "
520+
"The latter requires a new name, such as "
521+
"'Custom Dark', but the custom theme will work "
522+
"with any IDLE release, and can be modified.",
523+
parent=self)
510524
self.AddChangedItem('main', 'Theme', 'name', value)
511525
self.PaintThemeSample()
512526

0 commit comments

Comments
 (0)