0
0
mirror of https://github.com/python/cpython.git synced 2024-11-21 21:09:37 +01:00

gh-78955: Use user-selected color theme for Help => IDLE Doc (#9502)

This commit is contained in:
Terry Jan Reedy 2024-05-06 03:55:56 -04:00 committed by GitHub
parent a8e5fed100
commit 7758be4318
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 2 deletions

View File

@ -4,6 +4,8 @@ Released on 2024-10-xx
=========================
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,

View File

@ -33,6 +33,7 @@ from tkinter.ttk import Frame, Menubutton, Scrollbar, Style
from tkinter import font as tkfont
from idlelib.config import idleConf
from idlelib.colorizer import color_config
## About IDLE ##
@ -177,14 +178,16 @@ class HelpText(Text):
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)

View File

@ -0,0 +1 @@
Use user-selected color theme for Help => IDLE Doc.