diff --git a/magicgui/widgets/_bases/button_widget.py b/magicgui/widgets/_bases/button_widget.py index 27e51096a..f5f752b3d 100644 --- a/magicgui/widgets/_bases/button_widget.py +++ b/magicgui/widgets/_bases/button_widget.py @@ -28,7 +28,7 @@ def __init__(self, text: Optional[str] = None, **kwargs): ) text = text or kwargs.get("label") super().__init__(**kwargs) - self.text = text or self.name + self.text = (text or self.name).replace("_", " ") @property def options(self) -> dict: