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
diff --git a/Lib/idlelib/ClassBrowser.py b/Lib/idlelib/ClassBrowser.py
index 82f5191..e5a60a5 100644
--- a/Lib/idlelib/ClassBrowser.py
+++ b/Lib/idlelib/ClassBrowser.py
@@ -17,6 +17,7 @@
import PyShell
from WindowList import ListedToplevel
from TreeWidget import TreeNode, TreeItem, ScrolledCanvas
+from configHandler import idleConf
class ClassBrowser:
@@ -42,7 +43,9 @@
self.settitle()
top.focus_set()
# create scrolled canvas
- sc = ScrolledCanvas(top, bg="white", highlightthickness=0, takefocus=1)
+ theme = idleConf.GetOption('main','Theme','name')
+ background = idleConf.GetHighlight(theme, 'normal')['background']
+ sc = ScrolledCanvas(top, bg=background, highlightthickness=0, takefocus=1)
sc.frame.pack(expand=1, fill="both")
item = self.rootnode()
self.node = node = TreeNode(sc.canvas, None, item)