|
8 | 8 | import matplotlib.pyplot as plt |
9 | 9 | import matplotlib.dates as mdates |
10 | 10 | from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg |
11 | | -import customtkinter as ctk |
12 | 11 | from matplotlib.ticker import MaxNLocator, FuncFormatter |
| 12 | +import customtkinter as ctk |
13 | 13 | from winotify import Notification |
14 | 14 |
|
15 | 15 | from Package import * |
@@ -142,41 +142,41 @@ def _tab_frames_gui_setup(self) -> None: |
142 | 142 | self.timer_tab.pack(pady=tab_padding_y) |
143 | 143 | self.timer_tab_button = ctk.CTkButton(self.timer_tab, text="Timer", font=(tab_font_family, 22*tab_height/50, tab_font_weight), text_color=(light_font_color, font_color), |
144 | 144 | fg_color=(light_tab_selected_color, tab_selected_color), width=int(tab_frame_width*0.95), height=int(tab_height*0.8), hover_color=(light_tab_highlight_color, tab_highlight_color), |
145 | | - anchor="w", command=lambda: self.switch_tab("main")) |
| 145 | + anchor="w", command=lambda: self.switch_tab("Timer")) |
146 | 146 | self.timer_tab_button.place(relx=0.5, rely=0.5, anchor="center") |
147 | 147 |
|
148 | 148 | self.statistics_tab = ctk.CTkFrame(self.tab_frame, width=tab_frame_width, height=tab_height*0.8, fg_color=(light_tab_color, tab_color)) |
149 | 149 | self.statistics_tab.pack(pady=tab_padding_y) |
150 | 150 | self.statistics_tab_button = ctk.CTkButton(self.statistics_tab, text="Statistics", font=(tab_font_family, 22*tab_height/50, tab_font_weight), text_color=(light_font_color, font_color), |
151 | 151 | fg_color=(light_tab_color, tab_color), width=int(tab_frame_width*0.95), height=int(tab_height*0.8), hover_color=(light_tab_highlight_color, tab_highlight_color), |
152 | | - anchor="w", command=lambda: self.switch_tab("statistics")) |
| 152 | + anchor="w", command=lambda: self.switch_tab("Statistics")) |
153 | 153 | self.statistics_tab_button.place(relx=0.5, rely=0.5, anchor="center") |
154 | 154 |
|
155 | 155 | self.achievements_tab = ctk.CTkFrame(self.tab_frame, width=tab_frame_width, height=tab_height*0.8, fg_color=(light_tab_color, tab_color)) |
156 | 156 | self.achievements_tab.pack(pady=tab_padding_y) |
157 | 157 | self.achievements_tab_button = ctk.CTkButton(self.achievements_tab, text="Achievements", font=(tab_font_family, 22*tab_height/50, tab_font_weight), text_color=(light_font_color, font_color), |
158 | 158 | fg_color=(light_tab_color, tab_color), width=int(tab_frame_width*0.95), height=int(tab_height*0.8), hover_color=(light_tab_highlight_color, tab_highlight_color), |
159 | | - anchor="w", command=lambda: self.switch_tab("achievements")) |
| 159 | + anchor="w", command=lambda: self.switch_tab("Achievements")) |
160 | 160 | self.achievements_tab_button.place(relx=0.5, rely=0.5, anchor="center") |
161 | 161 |
|
162 | 162 | self.history_tab = ctk.CTkFrame(self.tab_frame, width=tab_frame_width, height=tab_height*0.8, fg_color=(light_tab_color, tab_color)) |
163 | 163 | self.history_tab.pack(pady=tab_padding_y) |
164 | 164 | self.history_tab_button = ctk.CTkButton(self.history_tab, text="History", font=(tab_font_family, 22*tab_height/50, tab_font_weight), text_color=(light_font_color, font_color), |
165 | 165 | fg_color=(light_tab_color, tab_color), width=int(tab_frame_width*0.95), height=int(tab_height*0.8), hover_color=(light_tab_highlight_color, tab_highlight_color), |
166 | | - anchor="w", command=lambda: self.switch_tab("history")) |
| 166 | + anchor="w", command=lambda: self.switch_tab("History")) |
167 | 167 | self.history_tab_button.place(relx=0.5, rely=0.5, anchor="center") |
168 | 168 |
|
169 | 169 | self.notes_tab = ctk.CTkFrame(self.tab_frame, width=tab_frame_width, height=tab_height*0.8, fg_color=(light_tab_color, tab_color)) |
170 | 170 | self.notes_tab.pack(pady=tab_padding_y) |
171 | 171 | self.notes_tab_button = ctk.CTkButton(self.notes_tab, text="Notes", font=(tab_font_family, 22*tab_height/50, tab_font_weight), text_color=(light_font_color, font_color), |
172 | 172 | fg_color=(light_tab_color, tab_color), width=int(tab_frame_width*0.95), height=int(tab_height*0.8), hover_color=(light_tab_highlight_color, tab_highlight_color), |
173 | | - anchor="w", command=lambda: self.switch_tab("notes")) |
| 173 | + anchor="w", command=lambda: self.switch_tab("Notes")) |
174 | 174 | self.notes_tab_button.place(relx=0.5, rely=0.5, anchor="center") |
175 | 175 |
|
176 | 176 | self.settings_tab = ctk.CTkFrame(self.tab_frame, width=tab_frame_width, height=tab_height*0.8, fg_color=(light_tab_color, tab_color)) |
177 | 177 | self.settings_tab.place(relx=0.5, rely=1, anchor="s") |
178 | 178 | self.settings_tab_button = ctk.CTkButton(self.settings_tab, text="Settings", font=(tab_font_family, 22*tab_height/50, tab_font_weight), text_color=(light_font_color, font_color), |
179 | | - fg_color=(light_tab_color, tab_color), width=int(tab_frame_width*0.95), height=int(tab_height*0.8), hover_color=(light_tab_highlight_color, tab_highlight_color), anchor="w", command=lambda: self.switch_tab("settings")) |
| 179 | + fg_color=(light_tab_color, tab_color), width=int(tab_frame_width*0.95), height=int(tab_height*0.8), hover_color=(light_tab_highlight_color, tab_highlight_color), anchor="w", command=lambda: self.switch_tab("Settings")) |
180 | 180 | self.settings_tab_button.place(relx=0.5, rely=0.5, anchor="center") |
181 | 181 |
|
182 | 182 |
|
@@ -545,12 +545,12 @@ def forget_and_propagate(self, list: list) -> None: |
545 | 545 |
|
546 | 546 | def switch_tab(self, tab = str) -> None: |
547 | 547 | tabs = { |
548 | | - "main": [self.main_frame, self.timer_tab_button], |
549 | | - "statistics": [self.statistics_frame, self.statistics_tab_button], |
550 | | - "settings": [self.settings_frame, self.settings_tab_button], |
551 | | - "achievements": [self.achievements_frame, self.achievements_tab_button], |
552 | | - "history": [self.history_frame, self.history_tab_button], |
553 | | - "notes": [self.notes_frame, self.notes_tab_button] |
| 548 | + "Timer": [self.main_frame, self.timer_tab_button], |
| 549 | + "Statistics": [self.statistics_frame, self.statistics_tab_button], |
| 550 | + "Settings": [self.settings_frame, self.settings_tab_button], |
| 551 | + "Achievements": [self.achievements_frame, self.achievements_tab_button], |
| 552 | + "History": [self.history_frame, self.history_tab_button], |
| 553 | + "Notes": [self.notes_frame, self.notes_tab_button] |
554 | 554 | } |
555 | 555 |
|
556 | 556 | tab_list = [self.main_frame, self.statistics_frame, self.settings_frame, self.achievements_frame, self.history_frame, self.notes_frame] |
@@ -789,10 +789,6 @@ def _exit_note(self, frame): |
789 | 789 | self.notes_frame_frame.grid(row=0, column=0, padx=frame_padding, pady=(frame_padding, 0)) |
790 | 790 |
|
791 | 791 |
|
792 | | - def _delete_note(self, frame): |
793 | | - frame.configure(fg_color="red") |
794 | | - #DELTE NOTE FROM EXCEL |
795 | | - |
796 | 792 | def clear_notes(self): |
797 | 793 | for note in self.notes_data_frame.winfo_children(): |
798 | 794 | note.destroy() |
|
0 commit comments