https://github.com/python/cpython/commit/6abf8401db57effb1fa4b1dd0a4477bc923a6385
commit: 6abf8401db57effb1fa4b1dd0a4477bc923a6385
branch: 3.12
author: Miss Islington (bot) <[email protected]>
committer: terryjreedy <[email protected]>
date: 2024-05-06T08:12:39Z
summary:

[3.12] gh-78955: Use user-selected color theme for Help => IDLE Doc (GH-9502) 
(#118632)

gh-78955: Use user-selected color theme for Help => IDLE Doc (GH-9502)
(cherry picked from commit 7758be431807d574e0f1bbab003796585ae46719)

Co-authored-by: Terry Jan Reedy <[email protected]>

files:
A Misc/NEWS.d/next/IDLE/2018-09-23-01-36-39.bpo-34774.VeM-X-.rst
M Lib/idlelib/News3.txt
M Lib/idlelib/help.py

diff --git a/Lib/idlelib/News3.txt b/Lib/idlelib/News3.txt
index 8d04ff30ad7ecf..d60f924242a91f 100644
--- a/Lib/idlelib/News3.txt
+++ b/Lib/idlelib/News3.txt
@@ -4,6 +4,8 @@ Released after 2023-10-02
 =========================
 
 
+gh-78955: Use user-selected color theme for Help => IDLE Doc.
+
 gh-96905: In idlelib code, stop redefining built-ins 'dict' and 'object'.
 
 gh-72284: Improve the lists of features, editor key bindings,
diff --git a/Lib/idlelib/help.py b/Lib/idlelib/help.py
index bdf4b2b29f11a2..d8613b2eadd6aa 100644
--- a/Lib/idlelib/help.py
+++ b/Lib/idlelib/help.py
@@ -33,6 +33,7 @@
 from tkinter import font as tkfont
 
 from idlelib.config import idleConf
+from idlelib.colorizer import color_config
 
 ## About IDLE ##
 
@@ -177,14 +178,16 @@ def __init__(self, parent, filename):
 
         normalfont = self.findfont(['TkDefaultFont', 'arial', 'helvetica'])
         fixedfont = self.findfont(['TkFixedFont', 'monaco', 'courier'])
+        color_config(self)
         self['font'] = (normalfont, 12)
         self.tag_configure('em', font=(normalfont, 12, 'italic'))
         self.tag_configure('h1', font=(normalfont, 20, 'bold'))
         self.tag_configure('h2', font=(normalfont, 18, 'bold'))
         self.tag_configure('h3', font=(normalfont, 15, 'bold'))
-        self.tag_configure('pre', font=(fixedfont, 12), background='#f6f6ff')
+        self.tag_configure('pre', font=(fixedfont, 12))
+        preback = self['selectbackground']
         self.tag_configure('preblock', font=(fixedfont, 10), lmargin1=25,
-                borderwidth=1, relief='solid', background='#eeffcc')
+                           background=preback)
         self.tag_configure('l1', lmargin1=25, lmargin2=25)
         self.tag_configure('l2', lmargin1=50, lmargin2=50)
         self.tag_configure('l3', lmargin1=75, lmargin2=75)
diff --git a/Misc/NEWS.d/next/IDLE/2018-09-23-01-36-39.bpo-34774.VeM-X-.rst 
b/Misc/NEWS.d/next/IDLE/2018-09-23-01-36-39.bpo-34774.VeM-X-.rst
new file mode 100644
index 00000000000000..cac44b13f3f1fa
--- /dev/null
+++ b/Misc/NEWS.d/next/IDLE/2018-09-23-01-36-39.bpo-34774.VeM-X-.rst
@@ -0,0 +1 @@
+Use user-selected color theme for Help => IDLE Doc.

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to