Skip to content

Commit cccf456

Browse files
committed
Integrate logging changes, change default theme to monokai and comment out scrollbar related functions until needed/removed.
1 parent 2c9fa7a commit cccf456

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

tkintermd/frame.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class TkintermdFrame(tk.Frame):
4040
def __init__(self, master, **kwargs):
4141
tk.Frame.__init__(self, master) # no need for super
4242

43-
logger = log.create_logger()
43+
self.logger = log.create_logger()
4444

4545
# Toolbar.
4646
self.top_bar = tk.Frame(self.master)
@@ -121,7 +121,7 @@ def __init__(self, master, **kwargs):
121121
# test them for compatability
122122
self.load_style(style_name)
123123
except Exception as E:
124-
logger.exception(f"WARNING: style {style_name} failed ({E}), removing from style menu.")
124+
self.logger.exception(f"WARNING: style {style_name} failed ({E}), removing from style menu.")
125125
continue # don't add them to the menu
126126
# add the rest to the menu
127127
self.style_menu.add_command(
@@ -133,7 +133,7 @@ def __init__(self, master, **kwargs):
133133

134134
# Set Pygments syntax highlighting style.
135135
self.lexer = Lexer()
136-
self.syntax_highlighting_tags = self.load_style("stata")
136+
self.syntax_highlighting_tags = self.load_style("monokai")
137137
# Default markdown string.
138138
default_text = constants.default_md_string
139139
self.text_area.insert(0.0, default_text)
@@ -180,26 +180,26 @@ def popup(self, event):
180180
"""
181181
self.right_click.tk_popup(event.x_root, event.y_root)
182182

183-
def on_scrollbar(self, *args):
184-
"""Scrolls the text area scrollbar when clicked/dragged with a mouse.
183+
# def on_scrollbar(self, *args):
184+
# """Scrolls the text area scrollbar when clicked/dragged with a mouse.
185185

186-
- Queries and changes the vertical position of the text area view.
187-
"""
188-
self.text_area.yview(*args)
189-
# # This links the scrollbars but is currently causing issues.
190-
# self.preview_area.html.yview(*args)
191-
192-
def on_mousewheel(self, *args):
193-
"""Moves the scrollbar and scrolls the text area on mousewheel event.
186+
# - Queries and changes the vertical position of the text area view.
187+
# """
188+
# self.text_area.yview(*args)
189+
# # # This links the scrollbars but is currently causing issues.
190+
# # self.preview_area.html.yview(*args)
191+
192+
# def on_mousewheel(self, *args):
193+
# """Moves the scrollbar and scrolls the text area on mousewheel event.
194194

195-
- Sets the fractional values of the slider position (upper and lower
196-
ends as value between 0 and 1).
197-
- Calls `on_scrollbar` function.
198-
"""
199-
self.scrollbar.set(*args)
200-
# # This links the scrollbars but is currently causing issues.
201-
# self.preview_area.vsb.set(*args)
202-
self.on_scrollbar('moveto', args[0])
195+
# - Sets the fractional values of the slider position (upper and lower
196+
# ends as value between 0 and 1).
197+
# - Calls `on_scrollbar` function.
198+
# """
199+
# self.scrollbar.set(*args)
200+
# # # This links the scrollbars but is currently causing issues.
201+
# # self.preview_area.vsb.set(*args)
202+
# self.on_scrollbar('moveto', args[0])
203203

204204
def select_all(self, *args):
205205
"""Select all text within the editor window.

0 commit comments

Comments
 (0)