@@ -80,12 +80,12 @@ def __init__(self, master, **kwargs):
80
80
# self.image_btn = tk.Button(self.top_bar, text="Image")
81
81
# self.image_btn.pack(side="left", padx=0, pady=0)
82
82
83
- self .style_opt = tk .Menubutton (self .top_bar , text = 'Style =' , relief = 'raised' )
84
- self .style_opt .pack (side = "left" , padx = 0 , pady = 0 )
85
- stylemenu = tk .Menu (self .style_opt , tearoff = False )
86
- stylemenu .add_command (label = 'Light' , command = lambda : self .load_style ('stata' ))
87
- stylemenu .add_command (label = 'Dark' , command = lambda : self .load_style ('stata-dark' ))
88
- self .style_opt ['menu' ] = stylemenu
83
+ self .style_opt_btn = tk .Menubutton (self .top_bar , text = 'Style =' , relief = 'raised' )
84
+ self .style_opt_btn .pack (side = "left" , padx = 0 , pady = 0 )
85
+ self . style_menu = tk .Menu (self .style_opt_btn , tearoff = False )
86
+ self . style_menu .add_command (label = 'Light' , command = lambda : self .load_style ('stata' ))
87
+ self . style_menu .add_command (label = 'Dark' , command = lambda : self .load_style ('stata-dark' ))
88
+ self .style_opt_btn ['menu' ] = self . style_menu
89
89
90
90
self .top_bar .pack (side = "top" , fill = "x" )
91
91
@@ -218,7 +218,7 @@ def on_input_change(self, event):
218
218
self .preview_area .load_html (html )
219
219
self .preview_area .add_css (self .css )
220
220
self .check_markdown (start = "1.0" , end = END )
221
- self .text_area .edit_modified (0 )# resets the text widget to generate another event when another change occours
221
+ self .text_area .edit_modified (0 ) # resets the text widget to generate another event when another change occours
222
222
223
223
def load_style (self , stylename ):
224
224
"""Load Pygments style for syntax highlighting within the editor."""
@@ -242,7 +242,6 @@ def load_style(self, stylename):
242
242
selectbackground = self .style .highlight_color )
243
243
self .text_area .tag_configure (str (Generic .StrongEmph ), font = ('Monospace' , 10 , 'bold' , 'italic' ))
244
244
self .syntax_highlighting_tags .append (str (Generic .StrongEmph ))
245
-
246
245
self .css = 'body {background-color: %s; color: %s}' % (
247
246
self .style .background_color ,
248
247
self .text_area .tag_cget ("Token.Text" , "foreground" )
0 commit comments