|
33 | 33 | from tkinter import font as tkfont |
34 | 34 |
|
35 | 35 | from idlelib.config import idleConf |
| 36 | +from idlelib.colorizer import color_config |
36 | 37 |
|
37 | 38 | ## About IDLE ## |
38 | 39 |
|
@@ -177,14 +178,16 @@ def __init__(self, parent, filename): |
177 | 178 |
|
178 | 179 | normalfont = self.findfont(['TkDefaultFont', 'arial', 'helvetica']) |
179 | 180 | fixedfont = self.findfont(['TkFixedFont', 'monaco', 'courier']) |
| 181 | + color_config(self) |
180 | 182 | self['font'] = (normalfont, 12) |
181 | 183 | self.tag_configure('em', font=(normalfont, 12, 'italic')) |
182 | 184 | self.tag_configure('h1', font=(normalfont, 20, 'bold')) |
183 | 185 | self.tag_configure('h2', font=(normalfont, 18, 'bold')) |
184 | 186 | self.tag_configure('h3', font=(normalfont, 15, 'bold')) |
185 | | - self.tag_configure('pre', font=(fixedfont, 12), background='#f6f6ff') |
| 187 | + self.tag_configure('pre', font=(fixedfont, 12)) |
| 188 | + preback = self['selectbackground'] |
186 | 189 | self.tag_configure('preblock', font=(fixedfont, 10), lmargin1=25, |
187 | | - borderwidth=1, relief='solid', background='#eeffcc') |
| 190 | + background=preback) |
188 | 191 | self.tag_configure('l1', lmargin1=25, lmargin2=25) |
189 | 192 | self.tag_configure('l2', lmargin1=50, lmargin2=50) |
190 | 193 | self.tag_configure('l3', lmargin1=75, lmargin2=75) |
|
0 commit comments