@@ -90,6 +90,8 @@ def __init__(
9090 self .add (self .mip_tab , text = "MIP" , sticky = tk .NSEW )
9191 self .add (self .waveform_tab , text = "Waveforms" , sticky = tk .NSEW )
9292
93+ uniform_grid (self )
94+
9395
9496class MIPTab (tk .Frame ):
9597 """MipTab class."""
@@ -114,19 +116,13 @@ def __init__(
114116 #: int: The index of the tab.
115117 self .index = 1
116118
117- #: Bool: The popup flag.
118- self .is_popup = False
119-
120119 #: Bool: The docked flag.
121120 self .is_docked = True
122121
123122 #: ttk.Frame: The frame that will hold the camera image.
124123 self .cam_image = ttk .Frame (self )
125124 self .cam_image .grid (row = 0 , column = 0 , rowspan = 3 , sticky = tk .NSEW )
126125
127- #: bool: The popup flag.
128- self .is_popup = False
129-
130126 #: bool: The docked flag.
131127 self .is_docked = True
132128
@@ -182,16 +178,14 @@ def __init__(
182178 #: int: The index of the tab.
183179 self .index = 0
184180
185- # Formatting
186- tk .Grid .columnconfigure (self , "all" , weight = 1 )
187- tk .Grid .rowconfigure (self , "all" , weight = 1 )
188-
189181 #: ttk.Frame: The frame that will hold the camera image.
190182 self .cam_image = ttk .Frame (self )
191- self .cam_image .grid (row = 0 , column = 0 , rowspan = 3 , sticky = tk .NSEW )
183+ self .cam_image .grid (row = 0 , column = 0 , sticky = tk .NSEW )
184+ self .display_setting = ttk .Frame (self )
185+ self .display_setting .grid (row = 0 , column = 1 , sticky = tk .NSEW )
192186
193- #: bool: The popup flag.
194- self .is_popup = False
187+ self . grid_rowconfigure ( 0 , weight = 1 )
188+ self .grid_columnconfigure ( 0 , weight = 1 )
195189
196190 #: bool: The docked flag.
197191 self .is_docked = True
@@ -214,13 +208,9 @@ def __init__(
214208 #: FigureCanvasTkAgg: The canvas that will hold the camera image.
215209 self .matplotlib_canvas = FigureCanvasTkAgg (self .matplotlib_figure , self .canvas )
216210
217- #: IntensityFrame: The frame that will hold the scale settings/palette color.
218- self .lut = IntensityFrame (self )
219- self .lut .grid (row = 0 , column = 1 , sticky = tk .NSEW , padx = 5 , pady = 5 )
220-
221211 #: tk.Scale: The slider that will hold the slice index.
222212 self .slider = tk .Scale (
223- self ,
213+ self . cam_image ,
224214 from_ = 0 ,
225215 to = 200 ,
226216 tickinterval = 20 ,
@@ -229,19 +219,23 @@ def __init__(
229219 label = "Slice" ,
230220 )
231221 self .slider .configure (state = "disabled" )
232- self .slider .grid (row = 3 , column = 0 , sticky = tk .NSEW , padx = 5 , pady = 5 )
222+ self .slider .grid (row = 1 , column = 0 , sticky = tk .NSEW , padx = 5 , pady = 5 )
233223 self .slider .grid_remove ()
234224
235225 #: HistogramFrame: The frame that will hold the histogram.
236- self .histogram = HistogramFrame (self )
237- self .histogram .grid (row = 4 , column = 0 , sticky = tk .NSEW , padx = 5 , pady = 5 )
226+ self .histogram = HistogramFrame (self .cam_image )
227+ self .histogram .grid (row = 2 , column = 0 , sticky = tk .NSEW , padx = 5 , pady = 5 )
228+
229+ #: IntensityFrame: The frame that will hold the scale settings/palette color.
230+ self .lut = IntensityFrame (self .display_setting )
231+ self .lut .grid (row = 0 , column = 1 , sticky = tk .NSEW , padx = 5 , pady = 5 )
238232
239233 #: MetricsFrame: The frame that will hold the camera selection and counts.
240- self .image_metrics = MetricsFrame (self )
234+ self .image_metrics = MetricsFrame (self . display_setting )
241235 self .image_metrics .grid (row = 1 , column = 1 , sticky = tk .NSEW , padx = 5 , pady = 5 )
242236
243237 #: RenderFrame: The frame that will hold the live display functionality.
244- self .live_frame = RenderFrame (self )
238+ self .live_frame = RenderFrame (self . display_setting )
245239 self .live_frame .grid (row = 2 , column = 1 , sticky = tk .NSEW , padx = 5 , pady = 5 )
246240
247241
0 commit comments