@@ -362,23 +362,23 @@ def _history_gui_setup(self) -> None:
362362 label .place (anchor = "center" , relx = 0.5 , rely = 0.5 )
363363
364364
365- self .start_frame = ctk .CTkFrame (self .history_data_frame , fg_color = "transparent" , width = (WIDTH - (frame_padding * 4 ))/ 5 )
365+ self .start_frame = ctk .CTkFrame (self .history_data_frame , fg_color = "transparent" , width = (WIDTH - (frame_padding * 4 ))/ 5 , height = 0 )
366366 self .start_frame .grid (row = 1 , column = 0 )
367367 self .start_frame .pack_propagate (False )
368368
369- self .end_frame = ctk .CTkFrame (self .history_data_frame , fg_color = "transparent" , width = (WIDTH - (frame_padding * 4 ))/ 5 )
369+ self .end_frame = ctk .CTkFrame (self .history_data_frame , fg_color = "transparent" , width = (WIDTH - (frame_padding * 4 ))/ 5 , height = 0 )
370370 self .end_frame .grid (row = 1 , column = 1 )
371371 self .end_frame .pack_propagate (False )
372372
373- self .duration_frame = ctk .CTkFrame (self .history_data_frame , fg_color = "transparent" , width = (WIDTH - (frame_padding * 4 ))/ 5 )
373+ self .duration_frame = ctk .CTkFrame (self .history_data_frame , fg_color = "transparent" , width = (WIDTH - (frame_padding * 4 ))/ 5 , height = 0 )
374374 self .duration_frame .grid (row = 1 , column = 2 )
375375 self .duration_frame .pack_propagate (False )
376376
377- self .break_frame = ctk .CTkFrame (self .history_data_frame , fg_color = "transparent" , width = (WIDTH - (frame_padding * 4 ))/ 5 )
377+ self .break_frame = ctk .CTkFrame (self .history_data_frame , fg_color = "transparent" , width = (WIDTH - (frame_padding * 4 ))/ 5 , height = 0 )
378378 self .break_frame .grid (row = 1 , column = 3 )
379379 self .break_frame .pack_propagate (False )
380380
381- self .subject_frame = ctk .CTkFrame (self .history_data_frame , fg_color = "transparent" , width = (WIDTH - (frame_padding * 4 ))/ 5 )
381+ self .subject_frame = ctk .CTkFrame (self .history_data_frame , fg_color = "transparent" , width = (WIDTH - (frame_padding * 4 ))/ 5 , height = 0 )
382382 self .subject_frame .grid (row = 1 , column = 4 )
383383 self .subject_frame .pack_propagate (False )
384384
@@ -1071,7 +1071,7 @@ def auto_break(self):
10711071
10721072 def try_timer ():
10731073 if self .timer_manager .break_time % self .data_manager .autobreak_duration == 0 :
1074- if self .can_autobreak == False :
1074+ if self .can_autobreak == False or self . timer_manager . timer_time != prev_time :
10751075 return
10761076 self .timer_manager .timer_mechanism (self .timer_button , self .break_button , self .time_display_label )
10771077 else :
@@ -1080,6 +1080,7 @@ def try_timer():
10801080 if self .autobreak_switch .get () == "On" and self .timer_manager .timer_running and self .timer_manager .timer_time % time_between == 0 :
10811081 self .timer_manager .break_mechanism (self .break_button , self .timer_button , self .break_display_label )
10821082 self .send_notification ("Auto-break" , f"Time for a { self .data_manager .autobreak_duration } -minute" )
1083+ prev_time = self .timer_manager .timer_time
10831084 self .WINDOW .after (self .data_manager .autobreak_duration * 60 * 1000 , try_timer )
10841085 round (self .timer_manager .break_time , - 1 )
10851086
@@ -1102,11 +1103,11 @@ def load_history(self):
11021103 self .break_frame .configure (height = self .history_height )
11031104 self .subject_frame .configure (height = self .history_height )
11041105
1105- ctk .CTkLabel (self .start_frame , text = str (self .worksheet ["A" + str (data )].value ), font = (font_family , font_size * 1 ), text_color = (light_off_font_color , off_font_color )).pack ()
1106- ctk .CTkLabel (self .end_frame , text = str (self .worksheet ["B" + str (data )].value ), font = (font_family , font_size * 1 ), text_color = (light_off_font_color , off_font_color )).pack ()
1107- ctk .CTkLabel (self .duration_frame , text = f"{ round (self .worksheet ["C" + str (data )].value )} Minutes" , font = (font_family , font_size * 1 ), text_color = (light_off_font_color , off_font_color )).pack ()
1108- ctk .CTkLabel (self .break_frame , text = f"{ round (self .worksheet ["D" + str (data )].value )} Minutes" , font = (font_family , font_size * 1 ), text_color = (light_off_font_color , off_font_color )).pack ()
1109- ctk .CTkLabel (self .subject_frame , text = str (self .worksheet ["E" + str (data )].value ), font = (font_family , font_size * 1 ), text_color = (light_off_font_color , off_font_color )).pack ()
1106+ ctk .CTkLabel (self .start_frame , text = str (self .worksheet ["A" + str (data )].value ), font = (font_family , font_size * 1 ), text_color = (light_off_font_color , off_font_color ), height = 30 ).pack ()
1107+ ctk .CTkLabel (self .end_frame , text = str (self .worksheet ["B" + str (data )].value ), font = (font_family , font_size * 1 ), text_color = (light_off_font_color , off_font_color ), height = 30 ).pack ()
1108+ ctk .CTkLabel (self .duration_frame , text = f"{ round (self .worksheet ["C" + str (data )].value )} Minutes" , font = (font_family , font_size * 1 ), text_color = (light_off_font_color , off_font_color ), height = 30 ).pack ()
1109+ ctk .CTkLabel (self .break_frame , text = f"{ round (self .worksheet ["D" + str (data )].value )} Minutes" , font = (font_family , font_size * 1 ), text_color = (light_off_font_color , off_font_color ), height = 30 ).pack ()
1110+ ctk .CTkLabel (self .subject_frame , text = str (self .worksheet ["E" + str (data )].value ), font = (font_family , font_size * 1 ), text_color = (light_off_font_color , off_font_color ), height = 30 ).pack ()
11101111
11111112
11121113 def _create_new_note_gui (self ):
0 commit comments