@@ -362,23 +362,23 @@ def _history_gui_setup(self) -> None:
362
362
label .place (anchor = "center" , relx = 0.5 , rely = 0.5 )
363
363
364
364
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 )
366
366
self .start_frame .grid (row = 1 , column = 0 )
367
367
self .start_frame .pack_propagate (False )
368
368
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 )
370
370
self .end_frame .grid (row = 1 , column = 1 )
371
371
self .end_frame .pack_propagate (False )
372
372
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 )
374
374
self .duration_frame .grid (row = 1 , column = 2 )
375
375
self .duration_frame .pack_propagate (False )
376
376
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 )
378
378
self .break_frame .grid (row = 1 , column = 3 )
379
379
self .break_frame .pack_propagate (False )
380
380
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 )
382
382
self .subject_frame .grid (row = 1 , column = 4 )
383
383
self .subject_frame .pack_propagate (False )
384
384
@@ -1071,7 +1071,7 @@ def auto_break(self):
1071
1071
1072
1072
def try_timer ():
1073
1073
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 :
1075
1075
return
1076
1076
self .timer_manager .timer_mechanism (self .timer_button , self .break_button , self .time_display_label )
1077
1077
else :
@@ -1080,6 +1080,7 @@ def try_timer():
1080
1080
if self .autobreak_switch .get () == "On" and self .timer_manager .timer_running and self .timer_manager .timer_time % time_between == 0 :
1081
1081
self .timer_manager .break_mechanism (self .break_button , self .timer_button , self .break_display_label )
1082
1082
self .send_notification ("Auto-break" , f"Time for a { self .data_manager .autobreak_duration } -minute" )
1083
+ prev_time = self .timer_manager .timer_time
1083
1084
self .WINDOW .after (self .data_manager .autobreak_duration * 60 * 1000 , try_timer )
1084
1085
round (self .timer_manager .break_time , - 1 )
1085
1086
@@ -1102,11 +1103,11 @@ def load_history(self):
1102
1103
self .break_frame .configure (height = self .history_height )
1103
1104
self .subject_frame .configure (height = self .history_height )
1104
1105
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 ()
1110
1111
1111
1112
1112
1113
def _create_new_note_gui (self ):
0 commit comments