diff options
author | Kurt B. Kaiser <kbk@shore.net> | 2004-03-08 18:15:31 +0000 |
---|---|---|
committer | Kurt B. Kaiser <kbk@shore.net> | 2004-03-08 18:15:31 +0000 |
commit | 7f27d182f32cbe1b6cef2a7e5b9d35f929fc4bbf (patch) | |
tree | cc48c0d59e3048262701d39aa8fc110a61d6c056 /Lib/idlelib/TreeWidget.py | |
parent | e7a938bddc67a27126d8c83cfc27e906f16835ed (diff) | |
download | cpython-7f27d182f32cbe1b6cef2a7e5b9d35f929fc4bbf.tar.gz |
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.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/idlelib/TreeWidget.py b/Lib/idlelib/TreeWidget.py index 1c9eb2ef14..c5c171fb83 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) |