8000 [3.12] gh-78955: Use user-selected color theme for Help => IDLE Doc (GH-9502) by miss-islington · Pull Request #118632 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Lib/idlelib/News3.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
7 changes: 5 additions & 2 deletions Lib/idlelib/help.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
from tkinter import font as tkfont

from idlelib.config import idleConf
from idlelib.colorizer import color_config

## About IDLE ##

Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Use user-selected color theme for Help => IDLE Doc.
Loading
0