@@ -359,13 +359,19 @@ def load_style(self, stylename):
359
359
kwargs ['font' ] = font
360
360
kwargs ['underline' ] = opts ['underline' ]
361
361
self .text_area .tag_configure (str (token ), ** kwargs )
362
+ self .preview_html .tag_configure (str (token ), ** kwargs )
362
363
self .syntax_highlighting_tags .append (str (token ))
363
364
# print(self.style.background_color or 'white', self.text_area.tag_cget("Token.Text", "foreground") or 'black', stylename)
364
365
self .text_area .configure (bg = self .style .background_color or 'white' ,
365
366
fg = self .text_area .tag_cget ("Token.Text" , "foreground" ) or 'black' ,
366
367
selectbackground = self .style .highlight_color ,
367
368
)
368
369
self .text_area .tag_configure (str (Generic .StrongEmph ), font = ('Monospace' , 10 , 'bold' , 'italic' ))
370
+ self .preview_html .configure (bg = self .style .background_color or 'white' ,
371
+ fg = self .preview_html .tag_cget ("Token.Text" , "foreground" ) or 'black' ,
372
+ selectbackground = self .style .highlight_color ,
373
+ )
374
+ self .preview_html .tag_configure (str (Generic .StrongEmph ), font = ('Monospace' , 10 , 'bold' , 'italic' ))
369
375
self .syntax_highlighting_tags .append (str (Generic .StrongEmph ))
370
376
self .css = 'body {background-color: %s; color: %s}' % (
371
377
self .style .background_color or 'white' ,
0 commit comments