diff --git a/micro_sam/sam_annotator/_widgets.py b/micro_sam/sam_annotator/_widgets.py index 07fa56b2..4a58a42a 100644 --- a/micro_sam/sam_annotator/_widgets.py +++ b/micro_sam/sam_annotator/_widgets.py @@ -145,20 +145,20 @@ def _add_choice_param(self, name, value, options, title=None, layout=None, updat layout.addWidget(dropdown) return dropdown, layout - def _add_shape_param(self, names, values, min_val, max_val, step=1, tooltip=None): + def _add_shape_param(self, names, values, min_val, max_val, step=1, title=None, tooltip=None): layout = QtWidgets.QHBoxLayout() x_layout = QtWidgets.QVBoxLayout() x_param, _ = self._add_int_param( names[0], values[0], min_val=min_val, max_val=max_val, layout=x_layout, step=step, - tooltip=tooltip + title=title[0] if title is not None else title, tooltip=tooltip ) layout.addLayout(x_layout) y_layout = QtWidgets.QVBoxLayout() y_param, _ = self._add_int_param( names[1], values[1], min_val=min_val, max_val=max_val, layout=y_layout, step=step, - tooltip=tooltip + title=title[1] if title is not None else title, tooltip=tooltip ) layout.addLayout(y_layout) diff --git a/micro_sam/sam_annotator/training_ui.py b/micro_sam/sam_annotator/training_ui.py index 2c1e5a4c..a41feec6 100644 --- a/micro_sam/sam_annotator/training_ui.py +++ b/micro_sam/sam_annotator/training_ui.py @@ -109,7 +109,7 @@ def _create_settings(self): self.patch_x, self.patch_y = 512, 512 self.patch_x_param, self.patch_y_param, layout = self._add_shape_param( ("patch_x", "patch_y"), (self.patch_x, self.patch_y), min_val=0, max_val=2048, - tooltip=get_tooltip("training", "patch") + tooltip=get_tooltip("training", "patch"), title=("Patch size x", "Patch size y") ) setting_values.layout().addLayout(layout)