mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #25313: Change the handling of new built-in text color themes to better
address the compatibility problem introduced by the addition of IDLE Dark. Consistently use the revised idleConf.CurrentTheme everywhere in idlelib.
This commit is contained in:
parent
84023247b4
commit
d0c0f0041c
8 changed files with 48 additions and 25 deletions
|
@ -152,7 +152,7 @@ class PyShellEditorWindow(EditorWindow):
|
|||
# possible due to update in restore_file_breaks
|
||||
return
|
||||
if color:
|
||||
theme = idleConf.GetOption('main','Theme','name')
|
||||
theme = idleConf.CurrentTheme()
|
||||
cfg = idleConf.GetHighlight(theme, "break")
|
||||
else:
|
||||
cfg = {'foreground': '', 'background': ''}
|
||||
|
@ -338,7 +338,7 @@ class ModifiedColorDelegator(ColorDelegator):
|
|||
|
||||
def LoadTagDefs(self):
|
||||
ColorDelegator.LoadTagDefs(self)
|
||||
theme = idleConf.GetOption('main','Theme','name')
|
||||
theme = idleConf.CurrentTheme()
|
||||
self.tagdefs.update({
|
||||
"stdin": {'background':None,'foreground':None},
|
||||
"stdout": idleConf.GetHighlight(theme, "stdout"),
|
||||
|
@ -621,7 +621,7 @@ class ModifiedInterpreter(InteractiveInterpreter):
|
|||
item = RemoteObjectBrowser.StubObjectTreeItem(self.rpcclt, oid)
|
||||
from idlelib.TreeWidget import ScrolledCanvas, TreeNode
|
||||
top = Toplevel(self.tkconsole.root)
|
||||
theme = idleConf.GetOption('main','Theme','name')
|
||||
theme = idleConf.CurrentTheme()
|
||||
background = idleConf.GetHighlight(theme, 'normal')['background']
|
||||
sc = ScrolledCanvas(top, bg=background, highlightthickness=0)
|
||||
sc.frame.pack(expand=1, fill="both")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue