Skip to content

Commit e433f23

Browse files
committed
Add buttons to configuration window
1 parent 1fc58c9 commit e433f23

1 file changed

Lines changed: 16 additions & 13 deletions

File tree

configure.py

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ class TuringConfigWindow:
227227
def __init__(self):
228228
self.window = Tk()
229229
self.window.title('Turing System Monitor configuration')
230-
self.window.geometry("820x580")
230+
self.window.geometry("820x590")
231231
self.window.iconphoto(True, PhotoImage(file=str(
232232
MAIN_DIRECTORY / "res/icons/monitor-icon-17865/64.png"))) # When window gets focus again, reload theme preview in case it has been updated by theme editor
233233
self.window.bind("<FocusIn>", self.on_theme_change)
@@ -237,7 +237,7 @@ def __init__(self):
237237
self.more_config_window = MoreConfigWindow(self)
238238

239239
# Make TK look better with Sun Valley ttk theme
240-
sv_ttk.set_theme("light")
240+
sv_ttk.use_light_theme()
241241

242242
self.theme_preview_img = None
243243
self.theme_preview = ttk.Label(self.window)
@@ -336,22 +336,25 @@ def __init__(self):
336336
version_label = ttk.Label(self.window, text=version, foreground=DISABLED_COLOR)
337337
version_label.place(x=5, y=550)
338338

339-
self.weather_ping_btn = ttk.Button(self.window, text="Weather & ping",
339+
self.weather_ping_btn = ttk.Button(self.window, text="Weather\n🌐 Ping",
340340
command=lambda: self.on_weatherping_click())
341-
self.weather_ping_btn.place(x=80, y=520, height=50, width=130)
341+
self.weather_ping_btn.place(x=80, y=520, height=60, width=130)
342342

343-
self.open_theme_folder_btn = ttk.Button(self.window, text="Open themes\nfolder",
343+
self.open_theme_folder_btn = ttk.Button(self.window, text=" 📁 Open\nthemes folder",
344344
command=lambda: self.on_open_theme_folder_click())
345-
self.open_theme_folder_btn.place(x=220, y=520, height=50, width=130)
345+
self.open_theme_folder_btn.place(x=220, y=520, height=60, width=130)
346346

347-
self.edit_theme_btn = ttk.Button(self.window, text="Edit theme", command=lambda: self.on_theme_editor_click())
348-
self.edit_theme_btn.place(x=360, y=520, height=50, width=130)
347+
self.edit_theme_btn = ttk.Button(self.window, text="🎨 Edit theme", command=lambda: self.on_theme_editor_click())
348+
self.edit_theme_btn.place(x=360, y=520, height=60, width=130)
349349

350-
self.save_btn = ttk.Button(self.window, text="Save settings", command=lambda: self.on_save_click())
351-
self.save_btn.place(x=500, y=520, height=50, width=130)
350+
self.save_btn = ttk.Button(self.window, text="💾 Save", command=lambda: self.on_save_click())
351+
self.save_btn.place(x=500, y=520, height=60, width=130)
352352

353-
self.save_run_btn = ttk.Button(self.window, text="Save and run", command=lambda: self.on_saverun_click())
354-
self.save_run_btn.place(x=640, y=520, height=50, width=130)
353+
style = ttk.Style()
354+
style.configure("Green.TButton", foreground="green")
355+
self.save_run_btn = ttk.Button(self.window, text="▶️ Save and run", command=lambda: self.on_saverun_click(),
356+
style="Green.TButton")
357+
self.save_run_btn.place(x=640, y=520, height=60, width=140)
355358

356359
self.config = None
357360
self.load_config_values()
@@ -657,7 +660,7 @@ def __init__(self, main_window: TuringConfigWindow):
657660
self.main_window = main_window
658661

659662
# Make TK look better with Sun Valley ttk theme
660-
sv_ttk.set_theme("light")
663+
sv_ttk.use_light_theme()
661664

662665
self.ping_label = ttk.Label(self.window, text='Hostname / IP to ping')
663666
self.ping_label.place(x=10, y=10)

0 commit comments

Comments
 (0)