diff --git a/spyder/api/widgets/mixins.py b/spyder/api/widgets/mixins.py index 96bd1952c1e..e6975e5e909 100644 --- a/spyder/api/widgets/mixins.py +++ b/spyder/api/widgets/mixins.py @@ -516,6 +516,7 @@ def create_action(self, name, text, icon=None, icon_text='', tip=None, action.text_beside_icon = bool(icon_text) action.shortcut_context = shortcut_context action.register_shortcut = register_shortcut + action.tip = tip if initial is not None: if toggled: diff --git a/spyder/api/widgets/toolbars.py b/spyder/api/widgets/toolbars.py index 1931857fa9a..dee4db96f03 100644 --- a/spyder/api/widgets/toolbars.py +++ b/spyder/api/widgets/toolbars.py @@ -51,7 +51,8 @@ def eventFilter(self, obj, event): event_type = event.type() action = obj.defaultAction() if isinstance(obj, QToolButton) else None if event_type == QEvent.ToolTip and action is not None: - return action.text_beside_icon + if action.tip is None: + return action.text_beside_icon return QObject.eventFilter(self, obj, event) diff --git a/spyder/plugins/profiler/widgets/main_widget.py b/spyder/plugins/profiler/widgets/main_widget.py index 209cb0deb00..83086b1e470 100644 --- a/spyder/plugins/profiler/widgets/main_widget.py +++ b/spyder/plugins/profiler/widgets/main_widget.py @@ -208,7 +208,7 @@ def setup(self, options): ) browse_action = self.create_action( ProfilerWidgetActions.Browse, - text=_('Browse'), + text='', tip=_('Select Python script'), icon=self.create_icon('fileopen'), triggered=lambda x: self.select_file(), @@ -216,6 +216,7 @@ def setup(self, options): self.log_action = self.create_action( ProfilerWidgetActions.ShowOutput, text=_("Output"), + icon_text=_("Output"), tip=_("Show program's output"), icon=self.create_icon('log'), triggered=self.show_log, @@ -237,6 +238,7 @@ def setup(self, options): self.save_action = self.create_action( ProfilerWidgetActions.SaveData, text=_("Save data"), + icon_text=_("Save data"), tip=_('Save profiling data'), icon=self.create_icon('filesave'), triggered=self.save_data, @@ -244,6 +246,7 @@ def setup(self, options): self.load_action = self.create_action( ProfilerWidgetActions.LoadData, text=_("Load data"), + icon_text=_("Load data"), tip=_('Load profiling data for comparison'), icon=self.create_icon('fileimport'), triggered=self.compare, @@ -251,9 +254,12 @@ def setup(self, options): self.clear_action = self.create_action( ProfilerWidgetActions.Clear, text=_("Clear comparison"), + icon_text=_("Clear comparison"), + tip=_("Clear comparison"), icon=self.create_icon('editdelete'), triggered=self.clear, ) + self.clear_action.setEnabled(False) # Main Toolbar toolbar = self.get_main_toolbar()