diff --git a/spyder/plugins/history/widgets.py b/spyder/plugins/history/widgets.py index fa3f65d68e8..73c5ab160dc 100644 --- a/spyder/plugins/history/widgets.py +++ b/spyder/plugins/history/widgets.py @@ -25,6 +25,7 @@ from spyder.widgets.findreplace import FindReplace from spyder.widgets.simplecodeeditor import SimpleCodeEditor from spyder.widgets.tabs import Tabs +from spyder.utils.stylesheet import PANES_TABBAR_STYLESHEET # Localization _ = get_translation('spyder') @@ -81,6 +82,7 @@ def __init__(self, name, plugin, parent): self.find_widget = FindReplace(self) # Setup + self.tabwidget.setStyleSheet(self._tabs_stylesheet) self.find_widget.hide() # Layout @@ -304,6 +306,16 @@ def refresh(self): self.find_widget.set_editor(editor) + @property + def _tabs_stylesheet(self): + """ + Change style of tabs because we don't have a close button here. + """ + tabs_stylesheet = PANES_TABBAR_STYLESHEET.get_copy() + css = tabs_stylesheet.get_stylesheet() + css['QTabBar::tab'].setValues(padding='4px') + return tabs_stylesheet.to_string() + def test(): """Run history widget.""" diff --git a/spyder/utils/stylesheet.py b/spyder/utils/stylesheet.py index 98fced90c06..dc150b8a252 100644 --- a/spyder/utils/stylesheet.py +++ b/spyder/utils/stylesheet.py @@ -41,7 +41,7 @@ def get_copy(self): This allows it to be modified for specific widgets. """ - return copy.deepcopy(self._stylesheet) + return copy.deepcopy(self) def set_stylesheet(self): raise NotImplementedError(