@@ -59,8 +59,7 @@ def __init__(self, parent, index, lang):
5959 self .dataframe2 .pack_propagate (False )
6060 self .dataframe2 .columnconfigure (0 , weight = 1 , minsize = 144 )
6161 self .dataframe2 .columnconfigure (1 , weight = 1 )
62- self .dataframe2 .rowconfigure (1 , weight = 1 )
63- self .dataframe2 .rowconfigure (5 , weight = 1 )
62+
6463
6564 self .graphlist = ScrollFrame (self .dataframe1 )
6665 path = os .path .join (os .path .dirname (os .path .abspath (__file__ )),".." ,"resources" , "images" )
@@ -76,26 +75,31 @@ def __init__(self, parent, index, lang):
7675 self .graphlist .grid (column = 0 , row = 0 , rowspan = 5 , sticky = "nsew" , padx = 5 , pady = 5 )
7776
7877 self .load_topas_button = ctk .CTkButton (self .dataframe2 , text = Text ().loadsim [self .lang ], command = self .load_topas , width = 20 )
79- self .load_topas_button .grid (row = 0 , column = 0 , sticky = "nsew" , pady = 5 , padx = 5 )
78+ self .load_topas_button .grid (row = 0 , column = 0 , sticky = "nsew" , pady = ( 5 , 2 ) , padx = 5 )
8079
8180 self .load_mcc_button = ctk .CTkButton (self .dataframe2 , text = Text ().loadmeasurement [self .lang ], command = self .load_measurement , width = 20 )
82- self .load_mcc_button .grid (row = 0 , column = 1 , sticky = "nsew" , padx = 5 , pady = 5 )
81+ self .load_mcc_button .grid (row = 0 , column = 1 , sticky = "nsew" , padx = 5 , pady = ( 5 , 2 ) )
8382
8483 self .normalize = ctk .BooleanVar (value = self .p .get_attribute ("normalize" ))
8584 normtypedict = {"maximum" :Text ().maximum [self .lang ], "plateau" :Text ().plateau [self .lang ], "centeraxis" :Text ().centeraxis [self .lang ]}
8685 self .normalization = ctk .StringVar (value = normtypedict [self .p .get_attribute ("normtype" )])
8786 self .normalize_button = ctk .CTkCheckBox (self .dataframe2 , text = Text ().normalize [self .lang ], variable = self .normalize , command = self .change_normalization , font = ("Bahnschrift" , 12 , "bold" ))
8887 self .normalize_options = ctk .CTkOptionMenu (self .dataframe2 , values = [Text ().maximum [self .lang ], Text ().plateau [self .lang ], Text ().centeraxis [self .lang ]], variable = self .normalization , command = self .change_normalization )
89- self .normalize_button .grid (row = 2 , column = 0 , sticky = "nsew" , pady = 5 , padx = 5 )
90- self .normalize_options .grid (row = 2 , column = 1 , sticky = "ew" , pady = 5 , padx = 5 )
88+ self .normalize_button .grid (row = 2 , column = 0 , sticky = "nsew" , pady = 2 , padx = 5 )
89+ self .normalize_options .grid (row = 2 , column = 1 , sticky = "ew" , pady = 2 , padx = 5 )
90+
91+ self .caxcorrection = ctk .BooleanVar (value = self .p .get_attribute ("caxcorrection" ))
92+
93+ self .cax_button = ctk .CTkCheckBox (self .dataframe2 , text = Text ().caxcorrection [self .lang ], variable = self .caxcorrection , onvalue = True , offvalue = False , command = self .toggle_cax_correction , font = ("Bahnschrift" ,12 , "bold" ))
94+ self .cax_button .grid (column = 0 , columnspan = 2 , row = 3 , padx = 5 , pady = 2 , sticky = "w" )
9195
9296 self .showgrid = ctk .BooleanVar (value = self .p .get_attribute ("grid" ))
9397
9498 self .gridoptions = ctk .StringVar (value = Text ().gridoptions1 [self .lang ])
9599 self .showgrid_button = ctk .CTkCheckBox (self .dataframe2 , text = Text ().showgrid [self .lang ], variable = self .showgrid , onvalue = True , offvalue = False , command = self .toggle_grid_options , font = ("Bahnschrift" ,12 , "bold" ))
96100 self .showgrid_options = ctk .CTkOptionMenu (self .dataframe2 , variable = self .gridoptions , values = [Text ().gridoptions1 [self .lang ], Text ().gridoptions2 [self .lang ]], command = lambda x : self .toggle_grid_options ())
97- self .showgrid_button .grid (column = 0 , row = 3 , padx = 5 , pady = 2 , sticky = "w" )
98- self .showgrid_options .grid (column = 1 , row = 3 , padx = 5 , pady = 2 , sticky = "w" )
101+ self .showgrid_button .grid (column = 0 , row = 4 , padx = 5 , pady = 2 , sticky = "w" )
102+ self .showgrid_options .grid (column = 1 , row = 4 , padx = 5 , pady = 2 , sticky = "w" )
99103
100104 self .showlegend = ctk .BooleanVar (value = self .p .get_attribute ("legend" ))
101105 self .legendoptions = ctk .StringVar (value = Text ().legendoptions1 [self .lang ]) ##
@@ -110,13 +114,13 @@ def __init__(self, parent, index, lang):
110114 Text ().legendoptions5 [self .lang ]],
111115 command = lambda x : self .toggle_legend_options ())
112116
113- self .showlegend_button .grid (column = 0 , row = 4 , padx = 5 , pady = 2 , sticky = "w" )
114- self .showlegend_options .grid (column = 1 , row = 4 , padx = 5 , pady = 2 , sticky = "w" )
117+ self .showlegend_button .grid (column = 0 , row = 5 , padx = 5 , pady = 2 , sticky = "w" )
118+ self .showlegend_options .grid (column = 1 , row = 5 , padx = 5 , pady = 2 , sticky = "w" )
115119
116120 self .change_name_button = ctk .CTkButton (self .dataframe2 , text = Text ().edittabname [self .lang ], command = self .change_name , width = 20 )
117121 self .close_tab_button = ctk .CTkButton (self .dataframe2 , text = Text ().closetab1 [self .lang ], command = lambda : self .parent .master .master .remove_tab (self .parent .master .master .tabnames .index (self .parent .name )), width = 20 , fg_color = "red" )
118- self .close_tab_button .grid (row = 6 , column = 1 , sticky = "nsew " , pady = 5 , padx = 5 )
119- self .change_name_button .grid (row = 6 , column = 0 , sticky = "nsew " , pady = 5 , padx = 5 )
122+ self .close_tab_button .grid (row = 6 , column = 1 , sticky = "new " , pady = ( 5 , 2 ) , padx = 5 )
123+ self .change_name_button .grid (row = 6 , column = 0 , sticky = "new " , pady = ( 5 , 2 ) , padx = 5 )
120124
121125
122126 #######################################################################################################################
@@ -432,7 +436,12 @@ def remove_plot(self):
432436 if len (self .parent .plots ) == 0 :
433437 self .disable_all_buttons ()
434438 self .parent .update ()
435-
439+
440+ def toggle_cax_correction (self , event = None ):
441+ self .parent .saved = False
442+ for plot in self .parent .plots :
443+ plot .caxcorrection = self .caxcorrection .get ()
444+ self .parent .update ()
436445
437446 def change_normalization (self , event = None ):
438447 self .parent .saved = False
0 commit comments