summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/TreeWidget.py
diff options
context:
space:
mode:
authorKurt B. Kaiser <kbk@shore.net>2004-03-08 18:15:31 (GMT)
committerKurt B. Kaiser <kbk@shore.net>2004-03-08 18:15:31 (GMT)
commit73360a3e61274ffcc4c9fc3d09746bd6603e92a5 (patch)
tree261894a40d78f78641cf21f4f16af44e5411cf07 /Lib/idlelib/TreeWidget.py
parent4102478f46c7b419c15b783643539801aaabb6a6 (diff)
downloadcpython-73360a3e61274ffcc4c9fc3d09746bd6603e92a5.zip
cpython-73360a3e61274ffcc4c9fc3d09746bd6603e92a5.tar.gz
cpython-73360a3e61274ffcc4c9fc3d09746bd6603e92a5.tar.bz2
Add a highlight theme for builtin keywords. Python Patch 805830 Nigel Rowe
M ClassBrowser.py M ColorDelegator.py M EditorWindow.py M NEWS.txt M PyShell.py M TreeWidget.py M config-highlight.def M configDialog.py M configHandler.py
Diffstat (limited to 'Lib/idlelib/TreeWidget.py')
-rw-r--r--Lib/idlelib/TreeWidget.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/idlelib/TreeWidget.py b/Lib/idlelib/TreeWidget.py
index 1c9eb2e..c5c171f 100644
--- a/Lib/idlelib/TreeWidget.py
+++ b/Lib/idlelib/TreeWidget.py
@@ -20,6 +20,7 @@ from Tkinter import *
import imp
import ZoomHeight
+from configHandler import idleConf
ICONDIR = "Icons"
@@ -249,10 +250,11 @@ class TreeNode:
except AttributeError:
# padding carefully selected (on Windows) to match Entry widget:
self.label = Label(self.canvas, text=text, bd=0, padx=2, pady=2)
+ theme = idleConf.GetOption('main','Theme','name')
if self.selected:
- self.label.configure(fg="white", bg="darkblue")
+ self.label.configure(idleConf.GetHighlight(theme, 'hilite'))
else:
- self.label.configure(fg="black", bg="white")
+ self.label.configure(idleConf.GetHighlight(theme, 'normal'))
id = self.canvas.create_window(textx, texty,
anchor="nw", window=self.label)
self.label.bind("<1>", self.select_or_edit)