@@ -8,7 +8,7 @@ def __init__(self, app, data_manager):
88 self .data_manager = data_manager
99
1010 def create_task (self , index ):
11- self .frame = ctk .CTkFrame (self .app .notes_data_frame , width = WIDTH + frame_padding , fg_color = (light_frame_color , frame_color ), height = button_height + frame_padding * 2 )
11+ self .frame = ctk .CTkFrame (self .app .notes_data_frame , width = WIDTH + frame_padding * 2 , fg_color = (light_frame_color , frame_color ), height = button_height + frame_padding * 2 )
1212 self .frame .pack (pady = frame_padding / 2 )
1313 self .frame .grid_propagate (False )
1414
@@ -27,16 +27,17 @@ def title_text(title: str) -> str:
2727 title .grid (row = 0 , column = 0 , padx = widget_padding_x )
2828 date = ctk .CTkLabel (self .frame , text = str (self .data_manager .worksheet ["N" + str (index )].value ), font = (font_family , font_size * 1.25 ),
2929 text_color = (light_font_color , font_color ), anchor = "center" , height = button_height + frame_padding * 2 )
30- date .place (anchor = "center" , relx = 0.75 , rely = 0.5 )
30+ date .place (anchor = "center" , relx = 0.5 , rely = 0.5 )
3131
3232 button_frame = ctk .CTkFrame (self .frame , fg_color = "transparent" )
33- button_frame .place (anchor = "center" , rely = 0.5 , relx = 0.925 )
33+ button_frame .place (anchor = "center" , rely = 0.5 , relx = 0.825 )
3434
35- open_button = ctk .CTkButton (button_frame , image = self .app .open_icon , text = "" , height = button_height , fg_color = self .data_manager .color , hover_color = self .data_manager .highlight_color , font = (font_family , font_size ), text_color = button_font_color , width = button_height ,
36- command = lambda : self ._open_notes_text (str (self .data_manager .worksheet ["N" + str (index )].value ), str (self .data_manager .worksheet ["O" + str (index )].value ), str (self .data_manager .worksheet ["P" + str (index )].value ), index ))
35+ open_button = ctk .CTkButton (button_frame , text = "Open" , height = button_height , fg_color = self .data_manager .color , hover_color = self .data_manager .highlight_color , font = (font_family , font_size ), text_color = button_font_color ,
36+ command = lambda : self ._open_notes_text (str (self .data_manager .worksheet ["N" + str (index )].value ), str (self .data_manager .worksheet ["O" + str (index )].value ), str (self .data_manager .worksheet ["P" + str (index )].value ), index )
37+ ,anchor = "center" )
3738 open_button .grid (row = 0 , column = 0 , padx = widget_padding_x )
38- delete_button = ctk .CTkButton (button_frame , image = self . app . delete_icon , text = "" , height = button_height , fg_color = self .data_manager .color , hover_color = self .data_manager .highlight_color , font = (font_family , font_size ), text_color = button_font_color ,
39- command = lambda : self .delete_task (index ), width = button_height )
39+ delete_button = ctk .CTkButton (button_frame , text = "Delete " , height = button_height , fg_color = self .data_manager .color , hover_color = self .data_manager .highlight_color , font = (font_family , font_size ), text_color = button_font_color ,
40+ command = lambda : self .delete_task (index ), anchor = "center" )
4041 delete_button .grid (row = 0 , column = 1 )
4142
4243
@@ -65,18 +66,18 @@ def _open_notes_text(self, date, title, text, index):
6566 #date_label.grid(row=0, column=0, padx=widget_padding_x, pady=widget_padding_y)
6667
6768 button_frame = ctk .CTkFrame (header_frame , fg_color = "transparent" )
68- button_frame .place (anchor = "center" , rely = 0.5 , relx = 0.95 )
69+ button_frame .place (anchor = "center" , rely = 0.5 , relx = 0.825 )
6970
7071 textbox = ctk .CTkTextbox (frame , font = (font_family , font_size ), text_color = (light_font_color , font_color ), fg_color = "transparent" , width = WIDTH - frame_padding * 2 , height = HEIGHT + frame_padding * 2 - 60 )
7172 textbox .grid (row = 1 , column = 0 )
7273 textbox .insert ("0.0" , text )
7374 textbox .configure (state = "disabled" )
7475
75- edit_button = ctk .CTkButton (button_frame , height = button_height , image = self . app . edit_icon , text = "" , fg_color = self .data_manager .color , width = button_height ,
76+ edit_button = ctk .CTkButton (button_frame , height = button_height , text = "Edit " , fg_color = self .data_manager .color , anchor = "center" ,
7677 hover_color = self .data_manager .highlight_color , font = (font_family , font_size ), text_color = button_font_color , command = lambda : self .edit_note (index , textbox , edit_button , frame ))
7778 edit_button .grid (row = 0 , column = 1 )
78- exit_button = ctk .CTkButton (button_frame , height = button_height , image = self . app . back_icon , text = "" , fg_color = self .data_manager .color , command = lambda : self ._exit_note (frame ),
79- hover_color = self .data_manager .highlight_color , font = (font_family , font_size ), text_color = button_font_color , width = button_height )
79+ exit_button = ctk .CTkButton (button_frame , height = button_height , text = "Exit " , fg_color = self .data_manager .color , command = lambda : self ._exit_note (frame ),
80+ hover_color = self .data_manager .highlight_color , font = (font_family , font_size ), text_color = button_font_color , anchor = "center" )
8081 exit_button .grid (row = 0 , column = 2 , padx = widget_padding_x , pady = widget_padding_y )
8182
8283
@@ -92,7 +93,7 @@ def save_note(index, frame):
9293 self .data_manager .workbook .save (self .app .data_file )
9394
9495 textbox .configure (state = "normal" , fg_color = (light_frame_color , frame_color ))
95- edit_button .configure (text = "" , image = self . app . save_icon , command = lambda : save_note (index , frame ), width = button_height )
96+ edit_button .configure (command = lambda : save_note (index , frame ), text = "Save" )
9697
9798
9899 def clear_notes (self ):
0 commit comments