|
23 | 23 | import os |
24 | 24 | import subprocess |
25 | 25 | import sys |
| 26 | +import webbrowser |
26 | 27 |
|
27 | 28 | MIN_PYTHON = (3, 8) |
28 | 29 | if sys.version_info < MIN_PYTHON: |
@@ -155,7 +156,7 @@ def __init__(self): |
155 | 156 | self.theme_preview = ttk.Label(self.window) |
156 | 157 | self.theme_preview.place(x=10, y=10) |
157 | 158 |
|
158 | | - self.theme_author = ttk.Label(self.window, foreground='#a3a3a3') |
| 159 | + self.theme_author = ttk.Label(self.window) |
159 | 160 |
|
160 | 161 | sysmon_label = ttk.Label(self.window, text='Display configuration', font='bold') |
161 | 162 | sysmon_label.place(x=320, y=0) |
@@ -255,7 +256,14 @@ def load_theme_preview(self): |
255 | 256 | self.theme_preview.config(image=self.theme_preview_img) |
256 | 257 |
|
257 | 258 | theme_data = get_theme_data(self.theme_cb.get()) |
258 | | - self.theme_author.config(text="Author: " + theme_data.get('author', 'unknown')) |
| 259 | + author_name = theme_data.get('author', 'unknown') |
| 260 | + self.theme_author.config(text="Author: " + author_name) |
| 261 | + if author_name.startswith("@"): |
| 262 | + self.theme_author.config(foreground="#a3a3ff", cursor="hand2") |
| 263 | + self.theme_author.bind("<Button-1>", lambda e: webbrowser.open_new_tab("https://github.com/" + author_name[1:])) |
| 264 | + else: |
| 265 | + self.theme_author.config(foreground="#a3a3a3", cursor="") |
| 266 | + self.theme_author.unbind("<Button-1>") |
259 | 267 | self.theme_author.place(x=10, y=self.theme_preview_img.height() + 15) |
260 | 268 |
|
261 | 269 | def load_config_values(self): |
|
0 commit comments