mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-14 08:17:13 +03:00
Remove label underline before opening URL in browser window.
This commit is contained in:
parent
e93810b4ce
commit
a4e38f7c63
@ -76,12 +76,14 @@ class HyperlinkLabel(ttk.Label, object):
|
||||
self.configure(font = self.font_u)
|
||||
|
||||
def _leave(self, event):
|
||||
self.configure(font = self.font_n)
|
||||
if self.underline is None:
|
||||
self.configure(font = self.font_n)
|
||||
|
||||
def _click(self, event):
|
||||
if self['text'] and str(self['state']) != tk.DISABLED:
|
||||
url = self.url(self['text']) if callable(self.url) else self.url
|
||||
if url:
|
||||
self._leave(event) # Remove underline before we change window to browser
|
||||
webbrowser.open(url)
|
||||
|
||||
def _contextmenu(self, event):
|
||||
|
Loading…
x
Reference in New Issue
Block a user