From 49528323af9fe7270f8ce12abf997283b5bed22c Mon Sep 17 00:00:00 2001 From: Blake Ridgway Date: Thu, 20 Mar 2025 19:46:32 -0500 Subject: [PATCH] (feat): Added simple exit button --- time_logix.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/time_logix.py b/time_logix.py index 0cf2696..093ae6e 100644 --- a/time_logix.py +++ b/time_logix.py @@ -57,6 +57,11 @@ class TimeLogix(tk.Tk): self.log_text = tk.Text(self, height=10, state=tk.DISABLED) self.log_text.pack(pady=5, padx=10, fill='both', expand=True) + + self.exit_button = tk.Button( + self, text="Exit", width=10, command=self.exit_app + ) + self.exit_button.pack(pady=5) def log_message(self, message): if hasattr(self, 'log_text'): @@ -226,6 +231,9 @@ class TimeLogix(tk.Tk): self.total_hours = total_duration.total_seconds() / 3600 self.total_hours_label.config(text=f"Total Hours Worked: {self.total_hours:.2f}") + def exit_app(self): + self.destroy() + if __name__ == "__main__": app = TimeLogix() app.mainloop()